【发布时间】:2021-03-28 13:44:15
【问题描述】:
大家好,我从 flyway 中删除了 4 个 sql 文件,并从数据库中删除了相应的 schema 版本行,这是一个 spring mvc 项目。我试图回滚所有文件,但没有任何改变。我正在使用intellij。有什么想法可以解决这个问题吗?
Error creating bean with name 'flyway' defined in ServletContext resource [/WEB-INF/applicationContext-db.xml]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not aenter code herepplied to database: 0.1.10
2020-12-17 22:21:21,189 INFO HikariPool - springHikariCP - Close initiated...
2020-12-17 22:21:21,205 INFO HikariPool - springHikariCP - Closed.
2020-12-17 22:21:21,205 ERROR ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in ServletContext resource [/WEB-INF/applicationContext-db.xml]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 0.1.10
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851)
【问题讨论】:
-
这是 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) 在 org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader. java:444)
标签: hibernate spring-mvc flyway