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
相关推荐
+VX:Fegn08951 小时前
计算机毕业设计|基于springboot + vue旅游管理系统(源码+数据库+文档)
java·开发语言·vue.js·spring boot·课程设计
需要8261 小时前
MySQL 索引 B+ 树与“查询为什么变慢了
java·spring boot·spring·spring cloud·tomcat
一 乐1 小时前
二手交易平台|基于springboot + vue二手交易平台(源码+数据库+文档)
java·数据库·vue.js·spring boot·小程序
vx-程序开发2 小时前
【计算机毕设】django校园跑腿服务系统83141
java·数据库·vue.js·spring boot·spring·elasticsearch·django
一 乐3 小时前
养老院管理系统|基于springboot + vue养老院管理系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·毕业设计
今年下半年6 小时前
SpringBoot整合金蝶中间件
spring boot·中间件·maven
字节探索6 小时前
别再只会写 Controller 了!一文吃透 Spring Boot 高级特性与项目实战
spring boot·spring
MetaLite7 小时前
全网最好的SpringBoot接口请求对象设计
java·spring boot·后端
摇滚侠8 小时前
《Spring Boot 3:高级与架构设计》第 2 章 IOC容器的高级机制 BeanFactoryPostProcessor 个人理解 6
java·spring boot·笔记·后端
xcl09259 小时前
宠物商城社交托运购物系统开发实战:从架构设计到完整实现指南
java·spring boot