1. 23 Jul, 2020 19 commits
    • Phillip Webb's avatar
      Overhaul "externalized configuration" docs · 8c6c4fa9
      Phillip Webb authored
      Update the "externalized configuration" reference documentation
      following the recent updates.
      
      Closes gh-22521
      8c6c4fa9
    • Phillip Webb's avatar
      Provide ConfigFileApplicationListener replacement · 3352024b
      Phillip Webb authored
      Deprecate `ConfigFileApplicationListener` and provide a replacement
      mechanism that supports arbitrary config data imports.
      
      This commit updates the following areas:
      
      - Extract `EnvironmentPostProcessor` invocation logic from the
        `ConfigFileApplicationListener` to new dedicated listener. Also
        providing support for `Log` injection.
      
      - Extract `RandomPropertySource` adding logic from the
        `ConfigFileApplicationListener` to a dedicated class.
      
      - Migrate to the recently introduced `DefaultPropertiesPropertySource`
        class when moving the defaultProperties `PropertySource`
      
      - Replace processing logic with a phased approach to ensure that
        profile enablement happens in a distinct phase and that profiles
        can no longer be activated on an ad-hoc basis.
      
      - Provide a more predictable and logical import order for processing
        `application.properties` and `application.yml` files.
      
      - Add support for a `spring.config.import` property which can be used
        to import additional config data. Also provide a pluggable API
        allowing third-parties to resolve and load locations themselves.
      
      - Add `spring.config.activate.on-profile` support which replaces the
        existing `spring.profiles` property.
      
      - Add `spring.config.activate.on-cloud-platform` support which allows
        a config data document to be active only on a given cloud platform.
      
      - Support a `spring.config.use-legacy-processing` property allowing the
        previous processing logic to be used.
      
      Closes gh-22497
      Co-authored-by: 's avatarMadhura Bhave <mbhave@vmware.com>
      3352024b
    • Phillip Webb's avatar
      Add Binder backed CloudPlatform.isEnforced method · 44f18362
      Phillip Webb authored
      Update `CloudPlatform` with a new `isEnforced` method that's backed
      by a `Binder` rather than the `Environment`. We'll require this when
      we overhaul our external config data processing logic.
      
      Closes gh-22498
      44f18362
    • Phillip Webb's avatar
      Extract DefaultPropertiesPropertySource class · cd364446
      Phillip Webb authored
      Extract `DefaultPropertiesPropertySource` from `SpringApplication` so
      that logic can be easily accessed by other classes. Specifically the
      property source name and logic to move the source to the end of the
      list needs to be called from several places.
      
      Closes gh-22520
      cd364446
    • Phillip Webb's avatar
      Add DeferredLogFactory support · 039fbdfa
      Phillip Webb authored
      Add a new `DeferredLogFactory` interface and `DeferredLogs`
      implementation that can be used when a `DeferredLog` instance is needed
      but the `switchOver` method should be handled elsewhere.
      
      This interface has primarily been added so `EnvironmentPostProcessor`
      classes will no longer need to implement `ApplicationEventListener`
      just to switch over their logs.
      
      Closes gh-22496
      039fbdfa
    • Madhura Bhave's avatar
      Add multi-document properties file support · 9e9eb90d
      Madhura Bhave authored
      Update `OriginTrackedPropertiesLoader` so that it can support
      multi-document properties files. These are similar to multi-document
      YAML files but use `#---` as the separator.
      
      Closes gh-22495
      Co-authored-by: 's avatarPhillip Webb <pwebb@vmware.com>
      9e9eb90d
    • Phillip Webb's avatar
      Add ConfigurationPropertySource.from method · 945e5b92
      Phillip Webb authored
      Add a factory method to `ConfigurationPropertySource` that allows a
      single Spring `PropertySource` instance to be adapted.
      
      Closes gh-22494
      945e5b92
    • Phillip Webb's avatar
      Filter empty YAML documents · 078e1469
      Phillip Webb authored
      Update `OriginTrackedYamlLoader` so that empty documents are filtered
      from the result. Prior to this commit, our origin wrapper would confuse
      the YAML processor and cause empty documents to be included in the Map
      with a key of "document" and no value.
      
      Closes gh-22493
      078e1469
    • Phillip Webb's avatar
      Add trailing escape character test · fdc6e801
      Phillip Webb authored
      Update `OriginTrackedPropertiesLoaderTests` to also test that an escape
      character can be the last character on a line.
      fdc6e801
    • Phillip Webb's avatar
      Add @Name support for value object binding · 2eeffe79
      Phillip Webb authored
      Update value object binder support so that parameters can be annotated
      with `@Name` if a specific property name should be used. Prior to this
      commit is was not possible to use Java reserved words as property names.
      
      Closes gh-22492
      2eeffe79
    • Phillip Webb's avatar
      Polish · 2d3ac4bb
      Phillip Webb authored
      2d3ac4bb
    • Phillip Webb's avatar
      Update copyright year of changed files · 3d7d9d06
      Phillip Webb authored
      3d7d9d06
    • Phillip Webb's avatar
      Polish · 14c1b093
      Phillip Webb authored
      14c1b093
    • Phillip Webb's avatar
      Merge branch '2.3.x' · da692868
      Phillip Webb authored
      da692868
    • Phillip Webb's avatar
      Update copyright year of changed files · 187d3af7
      Phillip Webb authored
      187d3af7
    • Phillip Webb's avatar
      Polish · d2a78080
      Phillip Webb authored
      d2a78080
    • Phillip Webb's avatar
      Merge branch '2.2.x' into 2.3.x · 217b2eff
      Phillip Webb authored
      217b2eff
    • Phillip Webb's avatar
      Update copyright year of changed files · b5e70157
      Phillip Webb authored
      b5e70157
    • Phillip Webb's avatar
      Polish · 51a26a4d
      Phillip Webb authored
      51a26a4d
  2. 22 Jul, 2020 21 commits