You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== Change Configuration Depending on the Environment
354
-
A YAML file is actually a sequence of documents separated by `---` lines, and each document is parsed separately to a flattened map.
354
+
Spring Boot supports multi-document YAML and Properties files (see <<spring-boot-features#boot-features-external-config-files-multi-document>> for details) which can be activated conditionally based on the active profiles.
355
355
356
-
If a YAML document contains a `spring.profiles` key, then the profiles value (a comma-separated list of profiles) is fed into the Spring `Environment.acceptsProfiles()` method.
357
-
If any of those profiles is active, that document is included in the final merge (otherwise, it is not), as shown in the following example:
356
+
If a document contains a `spring.config.activate.on-profile` key, then the profiles value (a comma-separated list of profiles or a profile expression) is fed into the Spring `Environment.acceptsProfiles()` method.
357
+
If the profile expression matches then that document is included in the final merge (otherwise, it is not), as shown in the following example:
0 commit comments