简体   繁体   English

初始化 springboot 创建名为“flywayInitializer”的 bean 时出错

[英]Error on initialize springboot creating bean with name 'flywayInitializer'

Getting error on flyway when i initialize first run on spring boot This is the erros i got on my run.当我在 spring 启动时初始化首次运行时,飞行路线出现错误这是我在运行时遇到的错误。

Just trying to initialize my first spring app and create the tables on sql database只是尝试初始化我的第一个 spring 应用程序并在 sql 数据库上创建表

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 java.lang.reflect.InvocationTargetException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.4.jar:5.3.4]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1153) ~[spring-context-5.3.4.jar:5.3.4]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:907) ~[spring-context-5.3.4.jar:5.3.4]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:582) ~[spring-context-5.3.4.jar:5.3.4]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) ~[spring-boot-2.4.3.jar:2.4.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) ~[spring-boot-2.4.3.jar:2.4.3]

Heres a picture of my folders migration, applicationproprieties, pom.xml这是我的文件夹迁移的图片,applicationproprieties,pom.xml

Folders文件夹

ApplicationPropreties应用属性

POM.XML POM.XML

you already try set configure this setting properties?您已经尝试设置配置此设置属性了吗?

 # MIGRATIONS PROPERTIES
spring.flyway.baseline-on-migrate=true

In My case, I need to update the application.yml file only就我而言,我只需要更新 application.yml 文件

spring: flyway: baseline-on-migrate=true spring:飞路:迁移基线=真

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建名为“flywayInitializer”的 bean 时出错 - Error creating bean with name 'flywayInitializer' BeanCreationException:创建名称为“flywayInitializer”的 bean 时出错 - BeanCreationException: Error creating bean with name 'flywayInitializer' SpringBoot-Flyway-JPA集成-创建名称为'flywayInitializer'的bean时出错-information_schema中的未知表'events' - SpringBoot - Flyway - JPA integration — Error creating bean with name 'flywayInitializer' - Unknown table 'events' in information_schema org.springframework.beans.factory.BeanCreationException:创建名为“flywayInitializer”的bean时出错 - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' 创建名为“configDataContextRefresher”的 bean 时出错 [SpringBoot] - Error creating bean with name 'configDataContextRefresher' [SpringBoot] 创建名为“requestMappingHandlerMapping”的 bean 时出错 - SpringBoot - Error creating bean with name 'requestMappingHandlerMapping' - SpringBoot Tomcat上的SpringBoot:创建名称为“ jacksonObjectMapperBuilder”的bean时出错 - SpringBoot on Tomcat: Error creating bean with name 'jacksonObjectMapperBuilder' SpringBoot MAVEN 和 MongoDB - 使用名称创建 bean 时出错 - SpringBoot MAVEN and MongoDB -Error creating bean with name SpringBoot 测试 - 创建名为“entityManagerFactory”的 bean 时出错 - SpringBoot Test - Error creating bean with name 'entityManagerFactory' SpringBoot JPA Hibernate:创建名称为'entityManagerFactory'的bean时出错 - SpringBoot JPA Hibernate: Error creating bean with name 'entityManagerFactory'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM