Spring configure files in test/resources


I have a project configured with a module that has a spring facet.

The module has spring contexts (xml files) defined in both src/main/resources and in src/test/resources. My question is around the support for the files that are in src/test/resources. In the facet  configuration there is a warning "Spring configuration files located in test source roots found". Although I can select that xml file in the facet configuration, when I view the file in the editor it always displays a warning at the top "Application context not configured for this file".

All spring context xml files are fine in src/main/resources but this appears to be a problem for any that are defined in src/test/resources (and which are used in integration tests). The tests themselves run fine and have no issue using the spring context xml files.

I am using IntelliJ IDEA 2016.2 Build #IU-162.1121.32, built on July 9, 2016

Any suggestions about what I am doing wrong? I had expected to be able to manage test application contexts in the same way as other application contexts.



Please sign in to leave a comment.