踩坑日记:项目启动报错An attempt was made to call a method that does not exist

482 阅读1分钟

SpringBoot项目启动报错An attempt was made to call a method that does not exist. 在微服务项目中使用了swagger 版本是2.9.2,后续有用到easypoi

   <groupId>cn.afterturn</groupId>
   <artifactId>easypoi-base</artifactId>
   <version>3.2.0</version>
 </dependency>

配置之后启动项目就出现了启动失败问题! 报错信息 分析: 1、刚引入了easypoipoi的包就出现这个问题了。An attempt was made to call a method that does not exist. 调用的方法不存在。看看依赖树easypoi版本

2、看报错信息第一行说的是springfox的问题,这就是swagger包问题。springfox使用版本

解决:这时能发现两个包依赖的guava版本是不同的,这个时候就会造成maven版本冲突。 知道问题就好解决了,单独对guava依赖并指定版本,这样问题就解决了。