Before (Spring 2.0 and earlier):

<bean id="propertyConfigurer">
 <property name="location">
  <value>file:${user.home}/env.properties</value>
 </property>
</bean>

After (Spring 2.5):

1.Loading 1 property file:

<context:property-placeholder location=”file:${user.home}/env.properties”/>

2.Loading multiple properties files:

<bean class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>

<property name=”locations”>

<list>
<value>classpath:file1</value>
<value>classpath:file2</value>
</list>

</property>

</bean>

*Other property:

-ignoreResourceNotFound

-ignoreUnresolvablePlaceholders

Advertisements