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

后端 未结 7 1985
不知归路
不知归路 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:44

    There is a reported bug with using the spring-test dependency (includes SpringJUnit4ClassRunner) with versions of JUnit > 4.4.

    If you are using a version of JUnit newer than 4.4, trying moving that down to 4.4 and see if it solves your problem.

提交回复
热议问题