I have place the configuration file for spring beans in package,
main.resources.com.springsample
But when i try to load it with below, the file couldn't identified. It always take the path where the current
test class reside (different package from where xml file reside)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [test/com/springsample//main/resources/com/springsample/springsample-introductions.xml]; nested exception is java.io.FileNotFoundException: class path resource [test/com/springsample//main/resources/com/springsample/springsample-introductions.xml] cannot be opened because it does not exist
But when i try without annotation like below, it recognized the file successfully,
ApplicationContext context =
new ClassPathXmlApplicationContext("\\main\\resources\\com\\springsample\\springsample-introductions.xml");