Skip to content

Instantly share code, notes, and snippets.

@acdcjunior
Created June 6, 2014 18:42
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 acdcjunior/516ca7245e34121a7a3d to your computer and use it in GitHub Desktop.
Save acdcjunior/516ca7245e34121a7a3d to your computer and use it in GitHub Desktop.
Properties File in spring application context
<bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location">
<value>/WEB-INF/applicationContext.properties</value>
</property>
</bean>
<context:property-placeholder properties-ref="configProperties" />
<!-- Now create a .properties file with the name above and reference its properties by
${propertyName} in .xml files or use @Value annotation to inject them in beans -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment