Allow DB migrations without DataSourceProperties
Update `FlywayAutoConfiguration`, `LiquibaseAutoConfiguration` and `DataSourceInitializer` classes so that they no longer depend on `DataSourceProperties`. DB migrations can now be performed against a `@Bean` defined primary `DataSource` with an alternative username/password. This update also removed using fallback properties when a custom connection `url` is defined with Flyway or Liquibase. We now assume that `username`, `password` and `driver-class-name` will be provided if the default values are unacceptable. Our previous logic was particularly flawed if a custom URL caused a change of driver type. Closes gh-25643
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<allow pkg=".*" regex="true" />
|
||||
|
||||
<subpackage name="autoconfigure">
|
||||
<disallow class="org.springframework.boot.autoconfigure.jdbc.DataSourceProperties"/>
|
||||
<subpackage name="web">
|
||||
<allow pkg="org.springframework.boot.web.server" />
|
||||
<allow pkg="org.springframework.boot.web.servlet.server" />
|
||||
|
||||
Reference in New Issue
Block a user