Maven依赖Guava前后版本兼容问题,Correct the classpath of your application so that it contains a single

项目启动报错提示Guava版本不兼容。分析发现存在19.0, 16.0和20.0三个版本的Guava依赖。为解决问题,排除所有旧版本,直接依赖最新20.0版本。但此方法可能导致未来版本冲突。参考文档提供了处理版本冲突的思路。" 104814916,4839447,Elasticsearch生产集群索引管理详解,"['搜索引擎', '数据管理', 'Elasticsearch集群', '索引操作']
摘要由CSDN通过智能技术生成

这是项目启动时报错

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    io.grpc.Metadata$Key.validateName(Metadata.java:629)

The following method did not exist:

    com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V

The method's class, com.google.common.base.Preconditions, is available from the following locations:

    jar:file:/H:/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar!/com/google/common/base/Preconditions.class

It was loaded from the following location:

    file:/H:/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of com.google.common.base.Preconditions

现在看看版本中都有哪些Jar依赖了 Guava
在这里插入图片描述
查看你依赖下都用了哪些版本的Guava,只看应用了哪个版本,中间的子依赖嵌套就不展示了。。

服务 Maven 依赖
├── spring-cloud-starter-alibaba-nacos-discovery
–> 19.0
–> 16.0
├──自建通用工具包
–> 20.0 guava

现在

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值