mercredi 29 juillet 2015

Hibernate : include configuration files in WEB-INF in tests

I have a web app and i am trying to set up the config for the unit tests. I have the following structure

project
-src/main/java
-src/main/resources
-src/test/java
-src/test/resources
-src
  -main
    -webapp
      -WEB-INF
        -spring
  -test
    -spring

All my spring configuration files are stored in the project\src\main\webapp\WEB-INF\spring directory. But the issue is that my test configuration files are stored in the project\src\test\spring directory.

For my tests i want to use some of the configuration files in the project\src\main\webapp\WEB-INF\spring directory but i keep getting a file not found exception when i try access them.

Is there a way to keep my configuration files in the WEB-INF folder but still visible to my test configuration files?

Aucun commentaire:

Enregistrer un commentaire