Created
June 6, 2014 18:42
-
-
Save acdcjunior/516ca7245e34121a7a3d to your computer and use it in GitHub Desktop.
Properties File in spring application context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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