Showing posts from October, 2012

A solution to have environment specific Spring application context files

I found this post today :

I have the following problem : I need to customize a web application. For example, on a production environment, I want my app to be automatically configured with production parameters. As this application uses Spring namespaces (grrrr), I can't use a DefaultPropertyPlaceHolderConfigurer to inject properties dynamically into config files. I really need to have Spring conf files per environment.

I made some changes to the code to make it compatible with Spring 2.5.6. Here are my classes :

And an example of Spring conf behind :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://w…