idea解決moven項目包依賴衝突問題

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檢查是否還存在衝突
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章