Skip to content

Instantly share code, notes, and snippets.

@anandnalya
Created July 11, 2012 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandnalya/3089221 to your computer and use it in GitHub Desktop.
Save anandnalya/3089221 to your computer and use it in GitHub Desktop.
Overriding one properties file with another optional properties file in Spring. Properties will be first searched in /path/local/config.properties and if not found, in classpath:config.properties
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config.properties</value>
<value>file:/path/local/config.properties</value>
</list>
</property>
<property name="ignoreResourceNotFound" value="true" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment