org.junit.platform.commons.util.ReflectionUtils.getDefaultClassLoader()LjavalangClassLoader;

xiaoxiao2021-02-27  144

是Junit版本问题

pom.xml引入的是

<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency>

但是程序视图采用Junit5运行,所以报错

将pom.xml里面的

<dependency>

<groupId>org.junit.jupiter</groupId>

<artifactId>junit-jupiter-api</artifactId>

<version>RELEASE</version>

</dependency>

删除就好用了

转载请注明原文地址: https://www.6miu.com/read-17054.html

最新回复(0)