Use dot notation rather than camel case for profile props (SPR-7508)

Before this change, the following properties could be used to manipulate
Spring profile behavior:

    -DspringProfiles=p1,p2
    -DdefaultSpringProfile=pD

These properties have been renamed to follow usual Java conventions for
property naming:

    -Dspring.profile.active=p1,p2
    -Dspring.profile.default=pD
This commit is contained in:
Chris Beams
2010-12-05 20:14:26 +00:00
parent 5062dc31af
commit e0c5ced695
3 changed files with 10 additions and 8 deletions

View File

@@ -50,9 +50,9 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver;
*/
public abstract class AbstractEnvironment implements ConfigurableEnvironment {
public static final String ACTIVE_PROFILES_PROPERTY_NAME = "springProfiles";
public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profile.active";
public static final String DEFAULT_PROFILE_PROPERTY_NAME = "defaultSpringProfile";
public static final String DEFAULT_PROFILE_PROPERTY_NAME = "spring.profile.default";
/**
* Default name of the default profile. Override with
@@ -293,9 +293,9 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
}
public String getDefaultProfile() {
String defaultSpringProfileProperty = getProperty(DEFAULT_PROFILE_PROPERTY_NAME);
if (defaultSpringProfileProperty != null) {
return defaultSpringProfileProperty;
String defaultProfileProperty = getProperty(DEFAULT_PROFILE_PROPERTY_NAME);
if (defaultProfileProperty != null) {
return defaultProfileProperty;
}
return defaultProfile;
}