|
|
@ -453,6 +453,9 @@ by using a `spring.profiles` key to indicate when the document applies. For exam
|
|
|
|
address: 192.168.1.120
|
|
|
|
address: 192.168.1.120
|
|
|
|
----
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In the example above, the `server.address` property will be `127.0.0.1` if the `development`
|
|
|
|
|
|
|
|
profile is active. If the `development` and `production` profiles are **not** enabled, then the
|
|
|
|
|
|
|
|
value for the property will be `192.168.1.100`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[boot-features-external-config-yaml-shortcomings]]
|
|
|
|
[[boot-features-external-config-yaml-shortcomings]]
|
|
|
@ -638,6 +641,9 @@ For example, when an application with following properties is run using the swit
|
|
|
|
spring.profiles.include: proddb,prodmq
|
|
|
|
spring.profiles.include: proddb,prodmq
|
|
|
|
----
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: Remember that the `spring.profiles` property can be defined in a YAML document
|
|
|
|
|
|
|
|
to determine when this particular document is included in the configuration. See
|
|
|
|
|
|
|
|
<<howto-change-configuration-depending-on-the-environment>> for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[boot-features-programmatically-setting-profiles]]
|
|
|
|
[[boot-features-programmatically-setting-profiles]]
|
|
|
|