spring boot项目 mvn test 和 mvn clean install 和 mvn test-compile 识别不到测试类无法运行单元测试

测试类使用了junit4, spring boot 版本的test 框架自带的是junit5,不兼容。

  1. 按照spring boot 对应的版本的junit框架,修改测试类,比如我就修改了junit5。
  2. 按照: https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/features.html#features.testing,强制使用junit4
相关推荐
I_itaiit15 分钟前
Spring Boot之Web服务器的启动流程分析
spring boot·nettywebserver·httphandler·webhandler
老李不敲代码1 小时前
榕壹云搭子系统技术解析:基于Spring Boot+MySQL+UniApp的同城社交平台开发实践
spring boot·mysql·微信小程序·uni-app·软件需求
养军博客2 小时前
spring boot3.0自定义校验注解:文章状态校验示例
java·前端·spring boot
小赵面校招3 小时前
Spring Boot整合MyBatis全攻略:原理剖析与最佳实践
java·spring boot·mybatis
曼岛_3 小时前
[Java实战]Spring Boot 3 整合 Ehcache 3(十九)
java·spring boot·spring
意倾城3 小时前
Spring Boot 配置文件敏感信息加密:Jasypt 实战
java·spring boot·后端
曼岛_3 小时前
[Java实战]Spring Boot 3 整合 Apache Shiro(二十一)
java·spring boot·apache
火皇4053 小时前
Spring Boot 使用 OSHI 实现系统运行状态监控接口
java·spring boot·后端
小赵面校招3 小时前
SpringBoot整合MyBatis-Plus:零XML实现高效CRUD
xml·spring boot·mybatis
不再幻想,脚踏实地3 小时前
Spring Boot配置文件
java·数据库·spring boot