<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.6</version> <scope>test</scope></dependency> 如下图是Eclipse中JUnit的版本
3.问题解决
3.1去掉工程的JUnit3的library,处理完如下图3.2把工程中的pom文件的JUnit版本修改为4.x,修改完如下:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency>4.问题总结
1.JUnit 3.x版本不支持注解形式,4.x版本支持注解版本。在工程应用中要确定自己使用的是那些版本。
新闻热点
疑难解答