spring 配置junit 启动时出现 ClassNotFound警告

spring 配置junit 启动时出现 ClassNotFound警告:
 
警告: Failed to classload type while reading annotation metadata. This is a non-fatal error, but certain annotation metadata may be unavailable. java.lang.ClassNotFoundException: org.testng.annotations.BeforeTest
 
 
解决方法:
 
将eclipse自带的junit和org.hamcrest.core.jar复制到项目的WEB-INF/lib中,在buildpath中把eclipse自带的junit库移除掉即可

转载于:https://www.cnblogs.com/yanzhenxing/archive/2013/03/18/2966667.html

你可能感兴趣的:(spring 配置junit 启动时出现 ClassNotFound警告)