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

后端 未结 7 2002
不知归路
不知归路 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 05:09

    Try by using * so that it can search to your classpath

    @ContextConfiguration(locations={"classpath*:applicationContext.xml"})
    
    0 讨论(0)
提交回复
热议问题