spring - @ContextConfiguration fail to load config file in src/test/resources
I've tried to load the spring config file in src/test/resources classpath with the following abstract class: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath:/applicationContext.xml"}) public class BaseIntegrationTests { } I have the applicationContext.xml file in src/test/resources but spring cant load it. Thank you. To be precise, it's the content of the test output directory ( target/test-classes ) that is on the class path, not src/test/resources . But resources under src/test/resources are copied to the test output directory by the resources