PropertyPlaceholderConfigurer()
PlaceholderConfigurerSupport subclass that resolves ${...} placeholders against local properties and/or system properties and environment variables.
As of Spring 3.1, org.springframework.context.support.PropertySourcesPlaceholderConfigurer should be used preferentially over this implementation; it is more flexible through taking advantage of the org.springframework.core.env.Environment and org.springframework.core.env.PropertySource mechanisms also made available in Spring 3.1.
PropertyPlaceholderConfigurer is still appropriate for use when:
spring-context module is not available (i.e., one is using Spring's BeanFactory API as opposed to ApplicationContext). "systemPropertiesMode" and/or "systemPropertiesModeName" properties. Users are encouraged to move away from using these settings, and rather configure property source search order through the container's Environment; however, exact preservation of functionality may be maintained by continuing to use PropertyPlaceholderConfigurer. Prior to Spring 3.1, the <context:property-placeholder/> namespace element registered an instance of PropertyPlaceholderConfigurer. It will still do so if using the spring-context-3.0.xsd definition of the namespace. That is, you can preserve registration of PropertyPlaceholderConfigurer through the namespace, even if using Spring 3.1; simply do not update your xsi:schemaLocation and continue using the 3.0 XSD.
Author
Juergen Hoeller
Author
Chris Beams
Since
02.10.2003
See Also
#setSystemPropertiesModeNamePlaceholderConfigurerSupportPropertyOverrideConfigurerorg.springframework.context.support.PropertySourcesPlaceholderConfigurer