首页 >> 编程问题收录 >> 当前文章

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

2023年09月15日 阅读量:2237

问题场景:

Springboot项目集成了Flyway,本来已经正常,但是今天改了蛮多业务代码,启动的时候突然不行了。

application-dev.yml配置文件中配置如下(此配置没有问题):

spring:
  flyway:
    enabled: on #是否开启flyway
    locations: classpath:db/migration_master  #sql脚本位置
    baseline-on-migrate: on
    baseline-version: 1 #基准版本,低于这个版本的sql不检查
    out-of-order: on

报错信息

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

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

解决过程:

开始怀疑是编译文件没有更新,就用maven的clean清理了编译的文件,重新编译结果还是不行。

再资讯看了下日志,是启动的时候没有读取到dev分支,所以读取不到配置,应该是clean失败了,重新clean之后就可以了。

觉得有用就点个赞吧 4
称:
箱:
容:
验证码:
本站累计访客数量:13743人
本站累计运行时长:320天
声明:本站部分内容属于原创,转载请注明出处,请勿作商业用途!本站少部分资源来自互联网,如果有侵犯到您的权益,请联系本站【niceliusir@qq.com】删除,谢谢合作!