I ran into this for property substitution in spring
but u
Put the property-placeholder configuration in an extra spring xml configuration file.
For example:
applicationContext.xml -- for the normal configration without any property-placeholder configurationapplicationContext-config.xml -- contains only a property-placeholder that load the production config file.testApplicationContext.xml. This file includes the applicationContext.xml and uses a property-placeholder with an other properties file.In a Web App you could load all production spring context files with this pattern applicationContext*.xml.
For the tests you need only to load testApplicationContext.xml this will include the normal config, but with other properties.