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
相关推荐
paopaokaka_luck3 小时前
基于SpringBoot+Vue的电影售票系统(协同过滤算法)
vue.js·spring boot·后端
陌殇殇6 小时前
SpringBoot整合SpringCache缓存
spring boot·redis·缓存
小林学习编程9 小时前
Springboot + vue + uni-app小程序web端全套家具商场
前端·vue.js·spring boot
ladymorgana9 小时前
【Spring boot】tomcat Jetty Undertow对比,以及应用场景
spring boot·tomcat·jetty
IT_10249 小时前
Spring Boot项目开发实战销售管理系统——系统设计!
大数据·spring boot·后端
DCTANT10 小时前
【原创】国产化适配-全量迁移MySQL数据到OpenGauss数据库
java·数据库·spring boot·mysql·opengauss
Touper.10 小时前
SpringBoot -- 自动配置原理
java·spring boot·后端
喜欢敲代码的程序员12 小时前
SpringBoot+Mybatis+MySQL+Vue+ElementUI前后端分离版:项目搭建(一)
spring boot·mysql·elementui·vue·mybatis
华子w90892585913 小时前
基于 SpringBoot+Vue.js+ElementUI 的 “花开富贵“ 花园管理系统设计与实现7000字论文
vue.js·spring boot·elementui
小时候的阳光14 小时前
SpringBoot3 spring.factories 自动配置功能不生效?
spring boot·spring·失效·factories·imports