Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Ljava/lang/Class;Ljava/lang/ClassLoader;)Ljava/util/List; from class org.springframework.boot.SpringApplication
最近在写一个自动化,发现加入spring-boot-test依赖后,系统启动报错,最后发现pom中该依赖加上版本号就可以了

修改前:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
</dependency>
修改增加版本后,报错解决:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>

本文介绍了一个Spring Boot项目中引入spring-boot-test依赖导致的启动异常问题,并给出了明确指定依赖版本作为解决方案。
760

被折叠的 条评论
为什么被折叠?



