Hi, I have a big problem in my company:
Scenario
- The same application "App" was installed in two contexts: www.company.com.br/AppProd and www.company.com.br/AppTest
- Each one has an app.properties file that contains its database configuration (url, user, password, etc).
- Each one has a separated Apache HTTP Server and 2 Tomcat for load balancing.
- Base technologies: Apache, Tomcat, Spring and Java
Problem:
We would like to keep the user changes (in the app.properties file) even if a new App is released and deployed.
Where/how should I put, link and load the app.properties in the source code/directory of the application?
Possible Solution (just a idea, not yet implemented):
Put each app.properties in the apache configuration directory, for example, apache1/conf/app.properties and apache2/conf/app.properties. Using this, we can redeploy a new version without overwrite the app.properties file, instead of to put this file (packed in the .war file) in the tomcat webapps directory.
I've read about
PropertyPlaceholderConfigurer, but how to use this Class in my scenario?
Anyone has a idea how to solve this problem?
Thanks in advance!
Rafael Oliveira