Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 弹簧靴滑道自动配置_Spring Boot_Flyway - Fatal编程技术网

Spring boot 弹簧靴滑道自动配置

Spring boot 弹簧靴滑道自动配置,spring-boot,flyway,Spring Boot,Flyway,Hy 我在Flyway 4.2.0中使用Spring Boot 1.5.7版本。 文件系统位置的flyway.locations属性配置有问题 如果使用file:prefix,则会出现Flyway错误: Caused by: org.flywaydb.core.api.FlywayException: Unknown prefix for location (should be either filesystem: or classpath:): 如果使用filesystem:prefix,则

Hy

我在Flyway 4.2.0中使用Spring Boot 1.5.7版本。 文件系统位置的flyway.locations属性配置有问题

如果使用file:prefix,则会出现Flyway错误:

Caused by: org.flywaydb.core.api.FlywayException: Unknown prefix for location (should be either filesystem: or classpath:):
如果使用filesystem:prefix,则

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

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

这似乎是Spring Boot中FlywayAutoConfiguration的一个bug

解决方法是使用
文件系统:
前缀,但禁用位置检查:

spring.flyway.check-location=false # spring boot 2.0.x
flyway.check-location=false        # spring boot 1.5.x
我提出了一项建议,并提交了一份报告


更新
修复程序已合并到Spring Boot和2.0.4中。

您可以发布配置吗?另外,您是否有任何理由不使用默认版本的flyway(3.2.1)作为spring boot 1.5.7.0版本?