Skip to content

Commit 811f5ab

Browse files
committed
Clarify the use of spring.profiles
Fixes gh-1470
1 parent 9a8d05b commit 811f5ab

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ content into your application; rather pick only the properties that you need.
3232
spring.config.location= # location of config file
3333
3434
# PROFILES
35-
spring.profiles= # comma list of active profiles
35+
spring.profiles.active= # comma list of <<howto-set-active-spring-profiles,active profiles>>
3636
3737
# APPLICATION SETTINGS ({sc-spring-boot}/SpringApplication.{sc-ext}[SpringApplication])
3838
spring.main.sources=

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ by using a `spring.profiles` key to indicate when the document applies. For exam
453453
address: 192.168.1.120
454454
----
455455

456+
In the example above, the `server.address` property will be `127.0.0.1` if the `development`
457+
profile is active. If the `development` and `production` profiles are **not** enabled, then the
458+
value for the property will be `192.168.1.100`
456459

457460

458461
[[boot-features-external-config-yaml-shortcomings]]
@@ -638,6 +641,9 @@ For example, when an application with following properties is run using the swit
638641
spring.profiles.include: proddb,prodmq
639642
----
640643

644+
NOTE: Remember that the `spring.profiles` property can be defined in a YAML document
645+
to determine when this particular document is included in the configuration. See
646+
<<howto-change-configuration-depending-on-the-environment>> for more details.
641647

642648

643649
[[boot-features-programmatically-setting-profiles]]

0 commit comments

Comments
 (0)