@Bozho's suggestion is almost certainly the most practical solution, especially if the differences between the deployments is minimal and can be expressed via simple scalar properties.
The alternative is to write your own BeanFactory
implementation. This is a non-trivial exercise, and you want to be sure that it's what you need. A good starting point would be to look at the source for XmlBeanFactory
, and then write your own (DatabaseBeanFactory
, perhaps) which does something similar, but fetching the bean definitions from the database, rather than from local XML files.
It's going to be quite a lot of extra work, though.