Compare the code below (my code)
Code:
PropertyOverrideConfigurer propertyOverrideConfigurer = new PropertyOverrideConfigurer();
propertyOverrideConfigurer.setProperties( myProperties );
applicationContext.addBeanFactoryPostProcessor(propertyOverrideConfigurer);
applicationContext.refresh();
with your code
Code:
PropertyOverrideConfigurer propertyOverrideConfigurer = new PropertyOverrideConfigurer();
propertyOverrideConfigurer.setProperties( myProperties );
propertyOverrideConfigurer.postProcessBeanFactory( applicationContext.getBeanFactory() );
applicationContext.refresh();
It is just a single line but an important difference... (hence my suggestion that you re-read my post).
I no where said that you cannot create the bean externally, you must only REGISTER the bean else everything you do is useless....