ssm报错 →: java.lang.IllegalStateException: SpringJUnit4ClassRunner requires JUnit 4.12 or higher

报错信息

Caused by: java.lang.IllegalStateException: SpringJUnit4ClassRunner requires JUnit 4.12 or higher.

报错原因

junit测试jar依赖包版本太低了

解决方法

将junit依赖改成 4.12以上

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

猜你喜欢

转载自blog.csdn.net/qq_45928727/article/details/108282634