Can't find applicationContext.xml from jar in classpath

I have Maven project with Spring. I have backend project as jar in the classpath(added as maven dependency). The backend project is with Spring again and has it's own applicationContext.xml. In the frontend project I have applicationContext.xml and I want to access the application context from tha backend like this:\[code\]<import resource="classpath:applicationContext.xml" />\[/code\]but i got:\[code\]org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:applicationContext.xml]Offending resource: ServletContext resource [/WEB-INF/appContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist\[/code\]Also tried:\[code\]<import resource="classpath*:applicationContext.xml" />\[/code\]and\[code\]<import resource="classpath:/applicationContext.xml" />\[/code\]
 
Back
Top