spring环境下的JUnit4测试报错

java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @BootstrapWith's 'value' attribute or make the default bootstrapper class available.  
    at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:160)  
    at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:105)  
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:154)  
 
 

此错误出现是因为spring-webmvc的版本与spring-test引入的版本不一致,

导致在使用sprint-test测试时报的错误

猜你喜欢

转载自blog.csdn.net/liu911025/article/details/80216589
今日推荐