The poc example doesn't show the full context of our situation here where several Spring config files come into play. There's already a PropertyPlaceHolder in one of the configs, overriden by a...
Type: Posts; User: Snow; Keyword(s):
The poc example doesn't show the full context of our situation here where several Spring config files come into play. There's already a PropertyPlaceHolder in one of the configs, overriden by a...
Genius, it works! Thx for the effort.
We set this programmatically at runtime to reuse the same Spring config for different behaviours.
ok, so when I put my ClassPathXmlApplicationContext back in place like this:
ClassPathXmlApplicationContext aContext = new ClassPathXmlApplicationContext(
SPRING_CONTEXT_PATHS,...
Digging this one back up...
I tried your solution, but now it returns me the value I put in the context XML and not the one from overridePropertiesPoc.properties. Is there something I forgot?
...
registerSingleton is not available on ClassPathXmlApplicationContext?
I made a small proof of concept to isolate the issue from the rest of my code: see attachment. The main class is OverridePropertiesPoc.
That sounded like a good idea!
I added
<property name="order" value="1" /> to the PropertyOverrideConfigurer in my XML and
cfg.setOrder(0); in my Java code.
Unfortunately, it still takes...
I have a PropertyOverrideConfigurer bean in one of my Spring xml configuration files/contexts.
In some cases, I want to reuse this Spring context, but overrule the PropertyOverrideConfigurer from...