0
<spring>
  <context type="Spring.Context.Support.XmlApplicationContext, Spring.Core">
    <resource uri="file://C:/config1.xml" />
    <resource uri="file://C:/config2.xml" />
    <resource uri="file://C:/config3.xml" />
    <resource uri="config://spring/objects" />
  </context>
</spring>

Instead of specifying the XML file locations in a configuration file, is there a way to programmatically specify these resource files after application start?

Marijn
  • 10,367
  • 5
  • 59
  • 80
Books
  • 5,163
  • 5
  • 19
  • 18

1 Answers1

1

Yes, you can do

IApplicationContext ctx = 
  new XmlApplicationContext("file://C:/config1.xml","file://C:/config2.xml", ..);

See instantiating a container in the spring.net docs for more information.

Marijn
  • 10,367
  • 5
  • 59
  • 80