我现在刚刚在Intellij中开始了一个新项目,使用Spring Boot版本2.1.3和带有Java 11的Flyway 5.2.4。
尝试启动我的项目后,我得到了:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is java.lang.IllegalStateException: Cannot find migrations location in: [classpath:db/migration] (please add migrations or check your Flyway configuration)
我有以下文件夹:
如您所见,我有“db /migration”,但没有任何迁移,我现在才刚刚开始。调试类FlywayAutoConfiguration i得到了以下内容:
所以,我试图返回“classpath:”中的所有文件,请参阅:
请注意,我只有“应用程序.属性”文件。
呼啦一阵风
慕莱坞森
子衿沉夜
蝴蝶不菲
心有法竹
相关分类