更新时间:2022-01-04 17:45:19
此问题的解决方法是重写Spring Boot的maven-surefire-plugin
定义并将useSystemClassLoader
设置为false
.阅读 Surefire文档以了解更多详情
Workaround for the issue was to override Spring Boot's maven-surefire-plugin
definition and set useSystemClassLoader
to false
. Read Surefire docs for more details
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>