Polish "Use custom DataSource if Flyway or Liquibase has user or url"

Closes gh-11751
This commit is contained in:
Andy Wilkinson
2018-01-26 14:35:28 +00:00
parent 5d3cd23eed
commit 192fe929c7
5 changed files with 40 additions and 31 deletions

View File

@@ -2139,7 +2139,10 @@ uses that for migrations. If you like to use a different `DataSource`, you can c
one and mark its `@Bean` as `@FlywayDataSource`. If you do so and want two data sources,
remember to create another one and mark it as `@Primary`. Alternatively, you can use
Flyway's native `DataSource` by setting `spring.flyway.[url,user,password]`
in external properties.
in external properties. Setting either `spring.flyway.url` or `spring.flyway.user`
is sufficent to cause Flyway to use its own `DataSource`. If any of the three
properties has not be set, the value of its equivalent `spring.datasource` property will
be used.
There is a {github-code}/spring-boot-samples/spring-boot-sample-flyway[Flyway sample] so
that you can see how to set things up.
@@ -2175,7 +2178,10 @@ that for migrations. If you need to use a different `DataSource`, you can create
mark its `@Bean` as `@LiquibaseDataSource`. If you do so and you want two data sources,
remember to create another one and mark it as `@Primary`. Alternatively, you can use
Liquibase's native `DataSource` by setting `spring.liquibase.[url,user,password]` in
external properties.
external properties. Setting either `spring.liquibase.url` or `spring.liquibase.user`
is sufficent to cause Liquibase to use its own `DataSource`. If any of the three
properties has not be set, the value of its equivalent `spring.datasource` property will
be used.
See
{sc-spring-boot-autoconfigure}/liquibase/LiquibaseProperties.{sc-ext}[`LiquibaseProperties`]