Spring Boot 2.1.6.RELEASE & JUnit5

问题描述

  • 我们正在使用 Spring boot 2.1.6,并且出于测试目的,我们添加spring boot starter test 2.1.6
  • spring boot starter test 2.1.6 带有 JUnit4
  • 我们计划使用 junit5

问题:

  • 我如何知道哪个使用 junit5spring boot starter test 版本将与 Spring boot 2.1.6 兼容?

解决方法

Spring Boot 2.1.x 版本为 no longer supported。根据 the release notes,Spring Boot 2.2 及更高版本默认使用 JUnit 5。