From 06d06d4aa94d9025ea7416110bff270eb8a632f3 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sat, 10 Dec 2011 19:30:57 +0000 Subject: [PATCH] Mention SystemEnvironmentPropertySource in related Javadoc Issue: SPR-8869 --- .../core/env/AbstractEnvironment.java | 14 ++++++++++++-- .../core/env/StandardEnvironment.java | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-) 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 ece942e89b..fcc067619d 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 b36747200c..35b97e5b85 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