Skip to content

Commit 06d06d4

Browse files
committed
Mention SystemEnvironmentPropertySource in related Javadoc
Issue: SPR-8869
1 parent 0449f6c commit 06d06d4

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

org.springframework.core/src/main/java/org/springframework/core/env/AbstractEnvironment.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,23 @@
5353
public abstract class AbstractEnvironment implements ConfigurableEnvironment {
5454

5555
/**
56-
* Name of property to set to specify active profiles: {@value}. May be comma delimited.
56+
* Name of property to set to specify active profiles: {@value}. Value may be comma
57+
* delimited.
58+
* <p>Note that certain shell environments such as Bash disallow the use of the period
59+
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
60+
* is in use, this property may be specified as an environment variable as
61+
* {@code SPRING_PROFILES_ACTIVE}.
5762
* @see ConfigurableEnvironment#setActiveProfiles
5863
*/
5964
public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profiles.active";
6065

6166
/**
62-
* Name of property to set to specify default profiles: {@value}. May be comma delimited.
67+
* Name of property to set to specify profiles active by default: {@value}. Value may
68+
* be comma delimited.
69+
* <p>Note that certain shell environments such as Bash disallow the use of the period
70+
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
71+
* is in use, this property may be specified as an environment variable as
72+
* {@code SPRING_PROFILES_DEFAULT}.
6373
* @see ConfigurableEnvironment#setDefaultProfiles
6474
*/
6575
public static final String DEFAULT_PROFILES_PROPERTY_NAME = "spring.profiles.default";

org.springframework.core/src/main/java/org/springframework/core/env/StandardEnvironment.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
* instance available from {@link #getPropertySources()}. See
4242
* {@link ConfigurableEnvironment} Javadoc for usage examples.
4343
*
44+
* <p>See {@link SystemEnvironmentPropertySource} Javadoc for details on special handling
45+
* of property names in shell environments (e.g. Bash) that disallow period characters in
46+
* variable names.
47+
*
4448
* @author Chris Beams
4549
* @since 3.1
4650
* @see ConfigurableEnvironment

0 commit comments

Comments
 (0)