【问题标题】:Spring Boot Flyway AutoConfigurationSpring Boot Flyway 自动配置
【发布时间】:2018-09-09 09:15:45
【问题描述】:

喂,

我正在使用 Spring Boot 1.5.7RELEASE 和 Flyway 4.2.0。 我对文件系统位置的 flyway.locations 属性的配置有问题。

如果我使用 file: 前缀,我有 Flyway 错误:

Caused by: org.flywaydb.core.api.FlywayException: Unknown prefix for location (should be either filesystem: or classpath:):

如果我使用 filesystem: 前缀,我有

Caused by: java.lang.IllegalStateException: Cannot find migrations location in:

我做错了什么? (如果我使用 classpath: 一切正常)

【问题讨论】:

标签: spring-boot flyway


【解决方案1】:

这似乎是 Spring Boot 中 FlywayAutoConfiguration 的错误。

一种解决方法是使用filesystem: 前缀但禁用位置检查:

spring.flyway.check-location=false # spring boot 2.0.x
flyway.check-location=false        # spring boot 1.5.x

我已提出issue 并提交了PR。


更新

该修复已合并到 Spring Boot 1.5.15 和 2.0.4 中。

【讨论】:

    猜你喜欢
    • 2017-10-11
    • 1970-01-01
    • 2017-01-19
    • 2018-09-06
    • 1970-01-01
    • 1970-01-01
    • 2019-05-03
    • 2017-12-11
    • 2015-02-24
    相关资源
    最近更新 更多