Skip to content

January 26, 2005

Loading more than one applicationContext XML file into a Spring context

You can use this command to load more than one application context file into a spring context:

String serviceContextLocation = "service.xml";
String serverContextLocation = "server.xml";
ClassPathXmlApplicationContext combinedContext = new ClassPathXmlApplicationContext(new String[] {serviceContextLocation, serverContextLocation});

Thanks for reading this post. Follow me on twitter here to be notified about updates and other posts I write. Or, subscribe to my RSS feed here

Fork me on GitHub
Read more from Java, Spring

Comments are closed.