【发布时间】:2020-07-07 00:31:51
【问题描述】:
我使用 flyway 作为我的本地配置文件来填充数据库以进行集成测试。
application.yml:
spring:
(...)
flyway.enabled: false
application-local.yml:
spring:
(...)
flyway:
enabled: true
license-key: (...)
locations: classpath:mssql/migrations
预期:
应用程序在启动过程中不会尝试使用配置文件 dev 自动配置 flyway
实际:
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)
版本:
flyway 核心 6.3.1 弹簧靴 2.2.5
【问题讨论】:
-
请展示您如何配置弹簧配置文件
标签: spring spring-boot flyway