1. 18 Mar, 2021 2 commits
    • Phillip Webb's avatar
      Allow DB migrations without DataSourceProperties · 8ba45cc6
      Phillip Webb authored
      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
      8ba45cc6
    • Phillip Webb's avatar
      Refactor DataSourceBuilder and add derivedFrom · 85f1e2c9
      Phillip Webb authored
      Refactor `DataSourceBuilder` to use direct property mappers rather than
      the `Binder` and aliases. Supported DataSource types now include two-way
      mappers which allows us to both get and set properties in a uniform way.
      
      A new `derivedFrom` factory method has been added which allows a new
      `DataSource` to be derived from an existing one. This update is
      primarily to allow Flyway and Liquibase migrations to work against a
      `@Bean` configured DataSource rather than assuming that the primary
      DataSource was always created via auto-configuration.
      
      See gh-25643
      85f1e2c9
  2. 17 Mar, 2021 38 commits