Hello,
I am trying to set paths of multiple xml files using FileSystemXmlApplicationContext
e.g .
private static ApplicationContext context;
private static InterFace1 bean1;
private static Interface2 bean2;
String filePaths[] = {"C:/...../config/app-context/file1.xml",""C:/...../config/app-context/file2.xml"};
context = new FileSystemXmlApplicationContext(filePaths);
bean1 = (InterFace1) context.getBean("bean1"); (This bean should get identified from the file1.xml)
bean2 = (InterFace2) context.getBean("bean2"); (This bean should get identifed from the file2.xml)
I tried to make it work but it gives me error "Caused by: java.io.FileNotFoundException: WEB-INF\config\*.properties (The system cannot find the path specified)"
does any one have any clue what is wrong with the code?
Thanks
how to set an application context constructor with an array
Moderator: Moderators
Re: how to set an application context constructor with an array
i'm somewhat stumped as to how someone would mistake this board to be connected to http://en.wikipedia.org/wiki/Spring_Framework
Re: how to set an application context constructor with an array
no I wouldnt think so but it does need escaping
Re: how to set an application context constructor with an array
using /,\ directly is no way to go in any case, java api provides sth like GetPathSeperator, so he should use it, no?
Re: how to set an application context constructor with an array
My thoughts exactly.koshi wrote:using /,\ directly is no way to go in any case, java api provides sth like GetPathSeperator, so he should use it, no?
Re: how to set an application context constructor with an array
What does sth mean in this context? I can't seem to find it.koshi wrote:java api provides sth like GetPathSeperator,