首页 > 解决方案 > Flyway 初始化失败。看不到文件

问题描述

我有错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-02-11 19:25:22.908 ERROR 8116 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Flyway failed to initialize: none of the following migration scripts locations could be found:

    - classpath:db/migration


Action:

Review the locations above or check your Flyway configuration

但是带有脚本的文件夹和文件是存在的!

在此处输入图像描述

还:

Appication.properties

spring.jpa.generate-ddl=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=validate

为什么 Flyway 看不到文件?

标签: databasepostgresqljpamigrationflyway

解决方案


有什么不对劲。根据图像图标,您的文件夹是一个包,而不是资源文件夹。也许你的目录名db.migration不是db/migration?使用终端或文件管理器再次创建文件夹。


推荐阅读