In setting up my test cases, I have this code:
ApplicationContext context = new ClassPathXmlApplicationContext(
"spring/common.xml"
);
StaticListableBeanFactory testBeanFactory = new StaticListableBeanFactory();
How to connect them so that tests can register beans in testBeanFactoryduring installation, and the rest of the application uses them instead of those defined in common.xml?
Note. I need to mix static (common.xml) and dynamic configuration. I cannot use XML for the latter because it would mean writing> 1000 XML files.
source
share