【问题标题】:Flyway failed to initialize. Doesn't see filesFlyway 初始化失败。看不到文件
【发布时间】:2020-05-27 03:16:30
【问题描述】:

我有错误:

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 看不到文件?

【问题讨论】:

    标签: database postgresql jpa migration flyway


    【解决方案1】:

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

    【讨论】:

    • IntelliJ 文件夹结构中的 db.migration 和 > db > migration 的唯一区别是项目配置中的设置。 Tree Appearance > Compact Middle Packages 包无论如何都是文件夹
    猜你喜欢
    • 2021-08-25
    • 2020-11-03
    • 2021-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-17
    • 2016-03-25
    • 2012-11-17
    相关资源
    最近更新 更多