程序包org.junit不存在

报错信息:程序包org.junit不存在。

问题原因:junit版本3.x使用的是编程的方式,4.x版本是注解方式。

解决办法:将junit版本提高到4.x,配置如下:

<dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.12</version>
     <scope>test</scope>
</dependency>

 

posted @ 2019-06-03 00:08  ycyzharry  阅读(3043)  评论(0)    收藏  举报