public class PropertySourcesPlaceholderConfigurer extends org.springframework.beans.factory.config.PlaceholderConfigurerSupport implements EnvironmentAware
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.
 It is used by default to support the property-placeholder element in working against
 the spring-context-3.1 or higher 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 PropertiesLoaderSupport.setProperties(java.util.Properties), PropertiesLoaderSupport.setLocations(org.springframework.core.io.Resource...)
 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 ConfigurableEnvironment and related javadocs
 for details on manipulating environment property sources.
ConfigurableEnvironment, 
PlaceholderConfigurerSupport, 
PropertyPlaceholderConfigurer| Modifier and Type | Field and Description | 
|---|---|
| static String | ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME"environmentProperties" is the name given to the  PropertySourcethat wraps the
 environment supplied to this configurer. | 
| static String | LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME"localProperties" is the name given to the  PropertySourcefor the set of
 merged properties supplied to this configurer. | 
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator| Constructor and Description | 
|---|
| PropertySourcesPlaceholderConfigurer() | 
| Modifier and Type | Method and Description | 
|---|---|
| org.springframework.core.env.PropertySources | getAppliedPropertySources()Return the property sources that were actually applied during
  post-processing. | 
| void | postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)Processing occurs by replacing ${...} placeholders in bean definitions by resolving each
 against this configurer's set of  PropertySources, which includes:
 
 all environment property sources, if anEnvironmentis present
 merged local properties, if any
 have been
 specified
 any property sources set by callingsetPropertySources(org.springframework.core.env.PropertySources) | 
| protected void | processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
                 org.springframework.core.env.ConfigurablePropertyResolver propertyResolver)Visit each bean definition in the given bean factory and attempt to replace ${...} property
 placeholders with values from the given properties. | 
| protected void | processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
                 Properties props)Deprecated. 
 | 
| void | setEnvironment(org.springframework.core.env.Environment environment)PropertySourcesfrom the givenEnvironmentwill be searched when replacing ${...} placeholders. | 
| void | setPropertySources(org.springframework.core.env.PropertySources propertySources)Customize the set of  PropertySourcesto be used by this configurer. | 
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparatorconvertProperties, convertProperty, convertPropertyValue, getOrder, setOrderpublic static final String LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME
PropertySource for the set of
 merged properties supplied to this configurer.public static final String ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME
PropertySource that wraps the
 environment supplied to this configurer.public PropertySourcesPlaceholderConfigurer()
public void setPropertySources(org.springframework.core.env.PropertySources propertySources)
PropertySources to be used by this configurer.
 Setting this property indicates that environment property sources and local properties should be ignored.
public void setEnvironment(org.springframework.core.env.Environment environment)
PropertySources from the given Environment
 will be searched when replacing ${...} placeholders.public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
PropertySources, which includes:
 Environment is present
 setPropertySources(org.springframework.core.env.PropertySources)
 If setPropertySources(org.springframework.core.env.PropertySources) is called, environment and local properties will be
 ignored. This method is designed to give the user fine-grained control over property
 sources, and once set, the configurer makes no assumptions about adding additional sources.
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessorpostProcessBeanFactory in class org.springframework.beans.factory.config.PropertyResourceConfigurerorg.springframework.beans.BeansExceptionprotected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
                                 org.springframework.core.env.ConfigurablePropertyResolver propertyResolver)
                          throws org.springframework.beans.BeansException
org.springframework.beans.BeansException@Deprecated protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Properties props)
processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)PlaceholderConfigurerSupport.processProperties in class org.springframework.beans.factory.config.PropertyResourceConfigurerUnsupportedOperationException - in this implementationpublic org.springframework.core.env.PropertySources getAppliedPropertySources()
                                                                       throws IllegalStateException
post-processing.IllegalStateException - if the property sources have not yet been applied