how to load more than one bean xml configuration file in springIOC container(either in BeanFactory or in AppilcationContext).
Asked
Active
Viewed 201 times
2 Answers
0
You can specify multiple config files when constructing your application context:
ApplicationContext context =
new ClassPathXmlApplicationContext(new String[] {"context1.xml",
"context2.xml","context3.xml"});

KernelKoder
- 746
- 5
- 15
0
If it is a web application and if you are using WebApplicationContext then in your web.xml you can specify xml files under tag like below
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
/WEB-INF/applicationContext1.xml
</param-value>
</context-param>

Dattatreya Kugve
- 320
- 1
- 4
- 21