Hi. I face the problem to have the same ApplicationContext to be loaded with different properties placeholder based on dynamic context (eg: for different database connection and credentials).

Now, I can load the context programmatically using ClasspathXmlApplicationContext of course but there is no way to specify to that class a specific placeholder file, that is stuck in the xml itself.

So I am wondering, how to load a new applicationContext from the same group of xml files with a property placeholder defined at runtime?

In the end I want to have something like an ApplicationContextFactory with custom properties, nothing more than this. Well, and then cache the AppContextS in some way but one step at a time.

Thanks for any tip.