idea解决moven项目包依赖冲突问题

当Maven项目出现依赖冲突导致应用程序无法启动时,本篇博客详细介绍了如何使用Idea的MavenHelper插件来诊断冲突的根源。通过具体案例,展示了如何定位冲突的JAR包及其版本,并提供了步骤指导,包括删除或替换不必要的依赖,以确保应用的正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

maven项目的依赖项目包存在冲突时,回报maven依赖java冲突的bug

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-06-14 13:01:25.426 ERROR 24868 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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:

    springfox.documentation.schema.DefaultModelDependencyProvider.dependentModels(DefaultModelDependencyProvider.java:79)

The following method did not exist:

    com.google.common.collect.FluentIterable.concat(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;

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

    jar:file:/C:/Users/user/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar!/com/google/common/collect/FluentIterable.class

It was loaded from the following location:

    file:/C:/Users/user/.m2/repository/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.FluentIterable

此时需要引进idea的maven helper插件,查看为什么冲突,那个jar包的依赖冲突了。

第一步:下载并安装maven helper
在这里插入图片描述
第二步:检查什么冲突
在这里插入图片描述
第三步:删除不必要的jar包或者替换掉版本即可,点击reimport检查是否还存在冲突
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MonkeyKing.sun

对你有帮助的话,可以打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值