spring-framework / org.springframework.beans.factory.config / PropertyPlaceholderConfigurer / <init>

<init>

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:

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