【发布时间】:2021-12-06 13:48:57
【问题描述】:
我收到以下错误:
Flyway failed to initialize: none of the following migration scripts locations could be found:
- classpath:db/*/migrations/
这是目录结构的样子:
这是我尝试过的:
# examples, obviously I tried these independently from each other
spring:
flyway:
# these work:
locations: "classpath:db"
locations: "classpath:db/release_1.0/migrations/"
# these don't work: (I am getting the same error as shown above)
locations: "classpath:db/**/migrations/"
locations: "classpath:db/release*/migrations/"
locations: "classpath:db/*/migrations/"
但它们应该根据 6.4 版的this blogpost 工作。 (我没有看到他们已将其删除)
我用的是spring-boot-starter-parent2.4.1,所以是Flyway 7.1.1。
谁能向我解释如何在 Flyway 中使用通配符指定迁移文件夹,为什么它不起作用?
【问题讨论】:
标签: spring-boot flyway