I'm placing applicationContext.xml in the same directory and package as my Java classes.
Doing the following to read it:
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
Yet I am consistently met with:
IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException
Which I do not get: The file is there, in the same directory as the classes. They're even compiled to /out and I can see it's all there.
I've tried putting it in src/resources/applicationContext.xml but to no avail.
Spring will look for it in the root of the classpath ...
src/resources is not on your classpath at allIf you put it in src/main/resources then it will be (1) on your classpath and (2) in the root of your classpath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With