I have two projects and each project has Spring XML files in their respective resources folder.
But one project is referenced by the other projects like importing jar.
How can I use XML in jar?
I have two projects and each project has Spring XML files in their respective resources folder.
But one project is referenced by the other projects like importing jar.
How can I use XML in jar?
You can use classpath*:/application-context.xml
- replace application-context.xml
with your filename.
If your Spring XML file is named applicaiton-context.xml move it under a folder spring in both the projects. You can then create a context with both XML files like this
ApplicationContext ctx = new ClasspathXmlApplicationContext("classpath*:/spring/application-context.xml")