When deploying an application (in Java with Spring framework on a tomcat server), I have to manually modify several config files before packaging the .war depending on the target environment (dev, prod, qualif, ...)
These modifications are on for now three files (a database config file, a new relic config file and another custom config file). But with the app growing it may affect more files.
I wonder if there is a better way to automatically modify these files when starting the app. Maybe with a custom parameter in command line ? I'm not sure what is the proper way to do that.
Use Maven profiles and filter your text resources as described here: