There are two spring approaches.
we create the ApplicationSettings.cfm.template file and delete it in the original control, but ignore the real AplicationSettings.cfm file. Any developer who first gets the code will copy ApplicationSettings.cfm.template into ApplicationSettings.cfm and fix it.
another approach is to write code to read from the .properties file and place it outside of your code base. Therefore, the configuration files are clean. It also means that updating the code base in production is less error prone because the configuration is not in the same place as the code (we have hundreds of deployments, so this is very important to us). Our code base is read from .. /conf/config.properties, so it refers to the code base, but not in the same place. Here is a very simple example of setting properties for an application area from a properties file:
var e=props.propertyNames() for(e=props.propertyNames();e.hasMoreElements(); ){ var key = e.nextElement(); application[key]=props.getProperty(key); }
source share