From 811f5ab80cdd027031676db0153ca9568023fd9d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 3 Sep 2014 16:30:55 +0200 Subject: [PATCH] Clarify the use of spring.profiles Fixes gh-1470 --- .../src/main/asciidoc/appendix-application-properties.adoc | 2 +- .../src/main/asciidoc/spring-boot-features.adoc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index eaabe2128d..3b3f6f2cc5 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -32,7 +32,7 @@ content into your application; rather pick only the properties that you need. spring.config.location= # location of config file # PROFILES - spring.profiles= # comma list of active profiles + spring.profiles.active= # comma list of <> # APPLICATION SETTINGS ({sc-spring-boot}/SpringApplication.{sc-ext}[SpringApplication]) spring.main.sources= diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 9cbc553ec2..007ab06166 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -453,6 +453,9 @@ by using a `spring.profiles` key to indicate when the document applies. For exam 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]] @@ -638,6 +641,9 @@ For example, when an application with following properties is run using the swit 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 +<> for more details. [[boot-features-programmatically-setting-profiles]]