Move script-based DataSource initializer into spring-boot

Closes gh-25487
Closes gh-25756
This commit is contained in:
Andy Wilkinson
2021-03-22 18:18:18 +00:00
parent fa336bb565
commit 5dee68c925
17 changed files with 579 additions and 379 deletions

View File

@@ -2056,6 +2056,10 @@ By default, Spring Boot enables the fail-fast feature of the Spring JDBC initial
This means that, if the scripts cause exceptions, the application fails to start.
You can tune that behavior by setting `spring.datasource.continue-on-error`.
To take complete control over the script-based initialization of a `DataSource`, define your own `ScriptDataSourceInitializer` bean.
Doing so will cause the auto-configuration of script-based initialization to back off.
If you have multiple `DataSource`s in your application, you can define multiple `ScriptDataSourceInitializer` beans.
[[howto-initialize-a-database-using-r2dbc]]