diff --git a/org.springframework.core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/org.springframework.core/src/main/java/org/springframework/core/env/AbstractEnvironment.java index ece942e89ba..fcc067619dc 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/env/AbstractEnvironment.java +++ b/org.springframework.core/src/main/java/org/springframework/core/env/AbstractEnvironment.java @@ -53,13 +53,23 @@ import org.springframework.util.StringUtils; public abstract class AbstractEnvironment implements ConfigurableEnvironment { /** - * Name of property to set to specify active profiles: {@value}. May be comma delimited. + * Name of property to set to specify active profiles: {@value}. Value may be comma + * delimited. + *
Note that certain shell environments such as Bash disallow the use of the period + * character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource} + * is in use, this property may be specified as an environment variable as + * {@code SPRING_PROFILES_ACTIVE}. * @see ConfigurableEnvironment#setActiveProfiles */ public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profiles.active"; /** - * Name of property to set to specify default profiles: {@value}. May be comma delimited. + * Name of property to set to specify profiles active by default: {@value}. Value may + * be comma delimited. + *
Note that certain shell environments such as Bash disallow the use of the period + * character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource} + * is in use, this property may be specified as an environment variable as + * {@code SPRING_PROFILES_DEFAULT}. * @see ConfigurableEnvironment#setDefaultProfiles */ public static final String DEFAULT_PROFILES_PROPERTY_NAME = "spring.profiles.default"; diff --git a/org.springframework.core/src/main/java/org/springframework/core/env/StandardEnvironment.java b/org.springframework.core/src/main/java/org/springframework/core/env/StandardEnvironment.java index b36747200cf..35b97e5b856 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/env/StandardEnvironment.java +++ b/org.springframework.core/src/main/java/org/springframework/core/env/StandardEnvironment.java @@ -41,6 +41,10 @@ package org.springframework.core.env; * instance available from {@link #getPropertySources()}. See * {@link ConfigurableEnvironment} Javadoc for usage examples. * + *
See {@link SystemEnvironmentPropertySource} Javadoc for details on special handling + * of property names in shell environments (e.g. Bash) that disallow period characters in + * variable names. + * * @author Chris Beams * @since 3.1 * @see ConfigurableEnvironment