0
Configuration of the POM:
Application properties:
Error while running project:
2019-12-19 11:23:27.844 ERROR 22884 --- [ restartedMain] o.s.boot.Springapplication : Application startup failed
org.springframework.Beans.factory.Beancreationexception: Error Creating bean with name 'flywayInitializer' defined in class path Resource [org/springframework/boot/autoconfigure/flyway/Flywayautoconfiguration$Flywayconfiguration.class]: Invocation of init method failed; nested Exception is org.flywaydb.core.api.Flywayexception: Unable to obtain Jdbc Connection from Datasource at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstractautowirecapablebeanfactory.java:1578) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(Abstractautowirecapablebeanfactory.java:545) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Abstractautowirecapablenfactory.java:482) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.Abstractbeanfactory$1.getObject(Abstractbeanfactory.java:306) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(Defaultsingletonbeanregistry.java:230) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractBeanFactory.doGetBean(Abstractbeanfactory.java:302) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractBeanFactory.getBean(Abstractbeanfactory.java:197) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractBeanFactory.doGetBean(Abstractbeanfactory.java:296) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractBeanFactory.getBean(Abstractbeanfactory.java:197) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.context.support.Abstractapplicationcontext.getBean(Abstractapplicationcontext.java:1054) ~[spring-context-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.context.support.Abstractapplicationcontext.finishBeanFactoryInitialization(Abstractapplicationcontext.java:829) ~[spring-context-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.context.support.Abstractapplicationcontext.refresh(Abstractapplicationcontext.java:538) ~[spring-context-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.boot.context.Embedded.EmbeddedWebApplicationContext.refresh(Embeddedwebapplicationcontext.java:118) ~[spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.boot.SpringApplication.refresh(Springapplication.java:760) [spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.boot.SpringApplication.createAndRefreshContext(Springapplication.java:360) [spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.boot.SpringApplication.run(Springapplication.java:306) [spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.boot.SpringApplication.run(Springapplication.java:1185) [spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.boot.SpringApplication.run(Springapplication.java:1174) [spring-boot-1.3.6.RELEASE. jar:1.3.6.RELEASE] at com.algaworks.Wine.WineApplication.main(Wineapplication.java:10) [classes/:na] at sun.reflect..Nativemethodaccessorimpl.invoke0(Native Method) ~[na:1.8.0_232] at sun.reflect..Nativemethodaccessorimpl.invoke(Nativemethodaccessorimpl.java:62) ~[na:1.8.0_232] at sun.reflect.Delegatingmethodaccessorimpl.invoke(Delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_232] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232] at org.springframework.boot.devtools.Restart.RestartLauncher.run(Restartlauncher.java:49) [spring-boot-devtools-1.3.6.RELEASE. jar:1.3.6.RELEASE] Caused by: org.flywaydb.core.api.Flywayexception: Unable to obtain Jdbc Connection from Datasource at org.flywaydb.core.internal.util.jdbcutils.openConnection(Jdbcutils.java:56) ~[flyway-core-3.2.1.jar:na] at org.flywaydb.core.Flyway.execute(Flyway.java:1385) ~[flyway-core-3.2.1.jar:na] at org.flywaydb.core.Flyway.migrate(Flyway.java:1006) ~[flyway-core-3.2.1.jar:na] at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(Flywaymigrationinitializer.java:66) ~[spring-boot-autoconfigure-1.3.6.RELEASE. jar:1.3.6.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(Abstractautowirecapablebeanfactory.java:1637) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstractautowirecapablebeanfactory.java:1574) ~[spring-Beans-4.2.7.RELEASE. jar:4.2.7.RELEASE] ... 23 common frames omitted Caused by: com.mysql.jdbc.exceptions.jdbc4.Mysqlnontransientconnectionexception: Could not create Connection to database server. at sun.reflect.Nativeconstructoraccessorimpl.newInstance0(Native