如何使用Yaml配置Flyway?

时间:2019-06-08 00:07:23

标签: spring-boot configuration yaml flyway

我有一个Spring Boot项目,我需要在application.yml文件中配置Flyway。

有人知道如何使用Yaml吗?

1 个答案:

答案 0 :(得分:1)

浏览此Flyway doc

Application.yml

spring:
  datasource:
    driverClassName: ${DRIVER}
    url: ${DB_URL}
    username: ${DB_USERNAME}
    password: ${DB_PASSWORD}
  jpa:
    show-sql: true
  flyway:
    enabled: true
    validate-on-migrate: true

依赖性

implementation 'org.flywaydb:flyway-core'