Skip to content

Commit 96cfc14

Browse files
committed
Merge pull request #40918 from vsanna
* pr/40918: Warn in the documentation that spring.profiles.group can only be used in non-profile-specific documents Closes gh-40918
2 parents 5ee0580 + 3ae1c11 commit 96cfc14

File tree

1 file changed

+6
-4
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/features

1 file changed

+6
-4
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/profiles.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ The name of the default profile is `default` and it can be tuned using the confi
3131
default: "none"
3232
----
3333

34-
`spring.profiles.active` and `spring.profiles.default` can only be used in non-profile specific documents.
35-
This means they cannot be included in <<features#features.external-config.files.profile-specific,profile specific files>> or <<features#features.external-config.files.activation-properties,documents activated>> by `spring.config.activate.on-profile`.
34+
`spring.profiles.active` and `spring.profiles.default` can only be used in non-profile-specific documents.
35+
This means they cannot be included in xref:features/external-config.adoc#features.external-config.files.profile-specific[profile specific files] or xref:features/external-config.adoc#features.external-config.files.activation-properties[documents activated] by `spring.config.activate.on-profile`.
3636

3737
For example, the second document configuration is invalid:
3838

@@ -75,8 +75,8 @@ For example, when an application with the following properties is run, the commo
7575
- "local"
7676
----
7777

78-
WARNING: Similar to `spring.profiles.active`, `spring.profiles.include` can only be used in non-profile specific documents.
79-
This means it cannot be included in <<features#features.external-config.files.profile-specific,profile specific files>> or <<features#features.external-config.files.activation-properties,documents activated>> by `spring.config.activate.on-profile`.
78+
WARNING: Similar to `spring.profiles.active`, `spring.profiles.include` can only be used in non-profile-specific documents.
79+
This means it cannot be included in xref:features/external-config.adoc#features.external-config.files.profile-specific[profile specific files] or xref:features/external-config.adoc#features.external-config.files.activation-properties[documents activated] by `spring.config.activate.on-profile`.
8080

8181
Profile groups, which are described in the <<features#features.profiles.groups,next section>> can also be used to add active profiles if a given profile is active.
8282

@@ -104,6 +104,8 @@ For example, we can create a `production` group that consists of our `proddb` an
104104

105105
Our application can now be started using `--spring.profiles.active=production` to activate the `production`, `proddb` and `prodmq` profiles in one hit.
106106

107+
WARNING: Similar to `spring.profiles.active` and `spring.profiles.include`, `spring.profiles.group` can only be used in non-profile-specific documents.
108+
This means it cannot be included in xref:features/external-config.adoc#features.external-config.files.profile-specific[profile specific files] or xref:features/external-config.adoc#features.external-config.files.activation-properties[documents activated] by `spring.config.activate.on-profile`.
107109

108110

109111
[[features.profiles.programmatically-setting-profiles]]

0 commit comments

Comments
 (0)