-
Notifications
You must be signed in to change notification settings - Fork 41k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multi-profile YAML in application-* files
Update ConfigFileEnvironmentPostProcessor to load profile specific sections for all previously processed profiles. Prior to this commit multi-profile YAML files were only loaded from the root `application.yml` file. With the updated logic, an `application-test.yml` file containing the following: someTestProperty: xyz --- spring: profiles: profile1 specificProperty: one Can have the profile sub-document loaded using: -Dspring.profiles.active=test,profile1 Fixes gh-4132
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
spring-boot/src/test/resources/application-activeprofilewithdifferentsubdoc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
spring.profiles: activeprofilewithdifferentsubdoc2 | ||
foobar: baz | ||
--- |