Expose Environment ConfigurationService

AbstractEnvironment delegates to an underlying ConfigurationService when
processing methods such as getProperty(String name, Class<?> targetType)

Accessor methods have been added to the ConfigurableEnvironment
interface that allow this service to be updated or replaced.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3810 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Chris Beams
2010-12-08 07:59:41 +00:00
parent 2a4e1c98da
commit 7d3a3e872f
2 changed files with 11 additions and 0 deletions
@@ -69,7 +69,13 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
new PropertyPlaceholderHelper(PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, VALUE_SEPARATOR, false);
public ConversionService getConversionService() {
return this.conversionService;
}
public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService;
}
public void addPropertySource(PropertySource<?> propertySource) {
propertySources.push(propertySource);
@@ -16,6 +16,8 @@
package org.springframework.core.env;
import org.springframework.core.convert.ConversionService;
/**
* TODO SPR-7508: document
*
@@ -34,4 +36,7 @@ public interface ConfigurableEnvironment extends Environment, PropertySourceAggr
*/
void setDefaultProfiles(String... profiles);
public ConversionService getConversionService();
public void setConversionService(ConversionService conversionService);
}