Commit Graph

12 Commits (d66496787d9ffce7cbf1309b0ab4072e6c74b453)

Author SHA1 Message Date
Phillip Webb c0d79b9273 Rationalize multi-document config file handling
Update `PropertySourceLoader` so that it no longer needs to deal with
matching multi-document files using the `spring.profile` property. The
loader now simply returns one or more `PropertSource` instances for a
given `Resource`.

All property matching now occurs in the `ConfigFileApplicationListener`.
This allows document processing logic to be contained in a single place,
and allows us to rationalize the algorithm so that negative matching
profiles are processed last.

Fixes gh-12159
7 years ago
Phillip Webb 4bde6b80ee Refactor YAML profile to deal with "!" profiles
Drop `SpringProfileDocumentMatcher` and replace it with two new
implementations that restrict when YAML documents are loaded. YAML
sections are now restricted both on the specific profile that is being
loaded, and the profiles that are currently accepted.

The `PropertySourceLoader` interface has been refined to include a
predicate that determines when a profile is accepted. The
`ConfigFileApplicationListener` simply delegates the predicate logic to
the `Environment`.

Fixes gh-8011
7 years ago
Stephane Nicoll 2d814e5102 Restore "Reason: " prefix 7 years ago
Stephane Nicoll 3291a7a76d Polish 7 years ago
Phillip Webb af50a18da9 Polish 7 years ago
Stephane Nicoll bdd532cc20 Clarify when a property was not renamed due to an incompatible type
Closes gh-11794
7 years ago
Stephane Nicoll 43e5e83d9c Transparently handle migration from number to java.util.Duration
See gh-11794
7 years ago
Phillip Webb b234501af3 Polish 7 years ago
Stephane Nicoll 43bac617d4 Add access to short deprecation reason
Closes gh-11770
7 years ago
Andy Wilkinson 4c23afdcd8 Polish 7 years ago
Phillip Webb e53bef737f Rename property migrator classes
Rename packages and classes to match the new module name.

See gh-11301
7 years ago
Stephane Nicoll b1525f4f2e Rename spring-boot-deprecated-properties-support
Rename `spring-boot-deprecated-properties-support` to
`spring-boot-properties-migrator`.

See gh-11301
7 years ago