我在本地配置文件中使用flyway来填充DB以进行集成测试。
application.yml
spring:
(...)
flyway.enabled: falseapplication-local.yml
spring:
(...)
flyway:
enabled: true
license-key: (...)
locations: classpath:mssql/migrations预期:
App在使用profile dev启动时不尝试自动配置飞道
实际:
The following profiles are active: dev
(...)
org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException:
(...)
Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException:
Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)版本:
天桥-核心6.3.1弹簧引导2.2.5
发布于 2020-04-03 16:40:26
您指定了application-local.yml,这意味着您指定了local配置文件,但是您使用dev配置文件运行应用程序。有两个潜在的问题:
使用错误的配置文件运行应用程序的dev
local而不是,您没有将local配置文件包含到devhttps://stackoverflow.com/questions/60866177
复制相似问题