问题描述

执行 SpringBoot2 测试时报错,提示找不到 SsmApplicationTests 主类

原因分析

Junit5 升级了框架没有兼容

问题解决

<!--测试模块-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>

测试类

org.junit.jupiter.api.Test;

替换成

import org.junit.Test;

最新文章

  1. 对于C++窗口编译一闪而过的解决方法 (DEV CPP下)
  2. java - Annotation元数据
  3. dictionaryWithObjectsAndKeys
  4. 20145102 《Java程序设计》第4周学习总结
  5. TypeScript 素描 - 模块
  6. 常用布局,div竖直居中
  7. MKMapView移动事件地图
  8. 动手学习TCP:数据传输(转)
  9. 使用JSmooth制造java jar文件可以运行exe文件教程图像
  10. akoj-1148-小光棍数
  11. 区块链 编译android geth 填坑记录 ubuntu
  12. Python多线程的简单实现(生产者消费者模型)
  13. python中各个response使用
  14. 30个极大提高开发效率的vscode插件
  15. python 面向对象编程(初级篇)
  16. 在Qt项目中如何添加一个已有的项目作为子项目
  17. js的this到底是什么意思
  18. 数据库——SQL数据单表查询
  19. springboot中定时任务
  20. Storm集成Kafka的Trident实现

热门文章

  1. (十)struts2的异常处理机制
  2. Flowable与springBoot项目整合及出现的问题
  3. CPU 空闲时在干嘛?
  4. Go-24-异常处理机制
  5. .Net之Docker部署详细流程
  6. hdu4280 最大流DINIC
  7. 从苏宁电器到卡巴斯基第24篇:难忘的三年硕士时光 II
  8. POJ1486模拟或者匈牙利变种
  9. PowerShell-3.多线程
  10. Win64 驱动内核编程-28.枚举消息钩子