Spring boot启动失败,2个版本的guava包需要使用,该如何解决?

IntelliJ IDEA控制台报的错误信息如下:
The following method did not exist:

com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;

The method's class, com.google.common.collect.Sets$SetView, is available from the following locations:

jar:file:/Users/Documents/mvn_repo/com/google/guava/guava/18.0/guava-18.0.jar!/com/google/common/collect/Sets$SetView.class

It was loaded from the following location:

file:/Users/Documents/mvn_repo/com/google/guava/guava/18.0/guava-18.0.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.Sets$SetView

2022-01-24 02:11:38.850 WARN 96102 --- [ Thread-2] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient
2022-01-24 02:11:38.851 WARN 96102 --- [ Thread-2] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Destruction of the end

Process finished with exit code 1

估计是包有冲突,guava-18.0.jar和guava-20.0.jar同时在使用。请教一下这个问题具体该如何解决?
(看网上说把版本改成一致,试了一下,不起作用)

手动在 pom 文件中引入 20.0 版本的依赖,根据优先级规则,这个 20.0 版本的依赖会生效。

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>20.0</version>
</dependency>

安装 Maven Helper 插件,查看低版本的 guava 在哪些地方用到了,将它们剔除,这样项目当中就只留下高版本的 guava 了。

img