Skip to content

Instantly share code, notes, and snippets.

@vijedi
Created October 8, 2011 03:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijedi/1271812 to your computer and use it in GitHub Desktop.
Save vijedi/1271812 to your computer and use it in GitHub Desktop.
Application Context Configured for Multiple PropertyPlaceholderConfigurator instances
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreResourceNotFound" value="false"/>
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="placeholderPrefix" value="@{" />
<property name="placeholderSuffix" value="}" />
<property name="locations">
<list>
<value>classpath:env.properties</value>
</list>
</property>
</bean>
<bean id="noahUrl" class="java.net.URL">
<constructor-arg value="http" />
<constructor-arg value="@{noah.host}" />
<constructor-arg value="@{noah.port}" />
<constructor-arg value="@{noah.env.path}" />
</bean>
<bean id="noahResource" class="org.springframework.core.io.UrlResource">
<constructor-arg ref="noahUrl" />
</bean>
<bean class="com.tejusparikh.spring.OrderedPropertyPlaceholderConfigurator">
<property name="ignoreResourceNotFound" value="false"/>
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="locations">
<list>
<ref bean="noahResource" />
</list>
</property>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment