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库移除掉即可