I have writing a Java application in IntelliJ 12 using Maven and Spring. I have the following folders:
src/main/java : for Java code
src/main/resources: for resources to be packaged into final built JAR
src/main/config: for external resources, i.e. the spring configuration file.
I have tried making the src/main/config a sources folder, however, upon running my application, it fails with a FileNotFoundException on the following line:
new ClassPathXmlApplicationContext("spring-config.xml");
spring-config.xml
sits inside src/main/config.
Also, I have noticed this file does not get copied over to the target directory that intelliJ produces when 'Make' building the project.
For now I am resorting to using a FileBasedApplicationContext for testing, however it would be nice to be able to run the application from within intelliJ without having to edit the code.
Thanks