IResource input = new FileSystemResource ( " objects.xml " );
IObjectFactory factory = new XmlObjectFactory(input);
< spring >
< context type ="Spring.Context.Support.XmlApplicationContext, Spring.Core" >
< resource uri ="file://objects.xml" />
< resource uri ="assembly://MyAssembly/MyProject/objects-dal-layer.xml" />
</ context >
</ spring >
< spring >
< context >
< resource uri ="file://objects.xml" />
< resource uri ="assembly://MyAssembly/MyProject/objects-dal-layer.xml" />
</ context >
</ spring >
IApplicationContext ctx = ContextRegistry.GetContext();
< configSections >
< sectionGroup name ="spring" >
< section name ="context" type ="Spring.Context.Support.ContextHandler, Spring.Core" />
</ sectionGroup >
</ configSections >
< objects xmlns ="http://www.springframework.net"
xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation ="http://www.springframework.net
http://www.springframework.net/xsd/spring-objects.xsd" >
< object id ="..." type ="..." >
...
</ object >
< object id ="...." type ="..." >
...
</ object >
...
</ objects >
< configuration >
< configSections >
< sectionGroup name ="spring" >
< section name ="context" type ="Spring.Context.Support.ContextHandler, Spring.Core" />
< section name ="objects" type ="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
</ sectionGroup >
</ configSections >
< spring >
< context >
< resource uri ="config://spring/objects" />
</ context >
< objects xmlns ="http://www.springframework.net" >
...
</ objects >
</ spring >
</ configuration >