1. Define “application base” or “property file location” as a context parameter in web.xml
<context-param>
<param-name>app.base</param-name>
</context-param>
2. Load all properties
file using Spring’s PropertyPlaceholderConfigurer.
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>${app.base}/myapp-app.properties</value>
<value>${app.base}/myapp-db.properties</value>
</list>
</property>
</bean>
No comments:
Post a Comment