junit兼容问题
1.报错
测试类找不到junit相关引用,是因为springBoot2.6.7版本把junit包去掉了
2.解决
dependencies里新增 junit:
<!--spring-boot-starter-test 高版本不提供junit,手动加入-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>