open class PropertySourcesPlaceholderConfigurer : PlaceholderConfigurerSupport, EnvironmentAware
Specialization of PlaceholderConfigurerSupport that resolves ${...} placeholders within bean definition property values and @Value annotations against the current Spring Environment and its set of PropertySources.
This class is designed as a general replacement for PropertyPlaceholderConfigurer in Spring 3.1 applications. It is used by default to support the property-placeholder element in working against the spring-context-3.1 XSD, whereas spring-context versions <= 3.0 default to PropertyPlaceholderConfigurer to ensure backward compatibility. See the spring-context XSD documentation for complete details.
Any local properties (e.g. those added via #setProperties, #setLocations et al.) are added as a PropertySource. Search precedence of local properties is based on the value of the localOverride property, which is by default false meaning that local properties are to be searched last, after all environment property sources.
See org.springframework.core.env.ConfigurableEnvironment and related javadocs for details on manipulating environment property sources.
Author
Chris Beams
Since
3.1
See Also
org.springframework.core.env.ConfigurableEnvironmentorg.springframework.beans.factory.config.PlaceholderConfigurerSupportorg.springframework.beans.factory.config.PropertyPlaceholderConfigurer
PropertySourcesPlaceholderConfigurer()
Specialization of PlaceholderConfigurerSupport that resolves ${...} placeholders within bean definition property values and This class is designed as a general replacement for Any local properties (e.g. those added via See org.springframework.core.env.ConfigurableEnvironment and related javadocs for details on manipulating environment property sources. |
static val ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME: String
{@value} is the name given to the PropertySource that wraps the environment supplied to this configurer. |
|
static val LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME: String
{@value} is the name given to the PropertySource for the set of merged properties supplied to this configurer. |
open fun getAppliedPropertySources(): PropertySources
Returns the property sources that were actually applied during |
|
open fun postProcessBeanFactory(beanFactory: ConfigurableListableBeanFactory): Unit
{@inheritDoc} Processing occurs by replacing ${...} placeholders in bean definitions by resolving each against this configurer's set of PropertySources, which includes:
If |
|
open fun setEnvironment(environment: Environment): Unit
{@inheritDoc}
|
|
open fun setPropertySources(propertySources: PropertySources): Unit
Customize the set of PropertySources to be used by this configurer. Setting this property indicates that environment property sources and local properties should be ignored. |