Exception in thread “main“ java.lang.IllegalAccessError: triedto access method org.springframework.
Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Ljava/lang/Class;Ljava/lang/ClassLoader;)Ljav
·
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>
更多推荐
已为社区贡献1条内容
所有评论(0)