spring - @ContextConfiguration fail to load config file in src/test/resources

后端 未结 7 1988
不知归路
不知归路 2021-02-05 04:13

I\'ve tried to load the spring config file in src/test/resources classpath with the following abstract class:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextCon         


        
7条回答
  •  误落风尘
    2021-02-05 04:50

    You seem to be using maven, and trying to run the tests from within eclipse. Check the buil folder (target/test-classes/) for applicationContext.xml. If it is not there, you'd have to build first.

提交回复
热议问题