原文:SpringBoot 引入第三方包之后 報錯 java.lang.NoSuchMethodError: com.google.gson.GsonBuilder.setLenient()

背景 在使用powerjob時引入第三方jar包 odps 后SpringBoot啟動報錯 解決方法 The following method did not exist: com.google.gson.GsonBuilder.setLenient Lcom google gson GsonBuilder ...

2021-03-12 16:31 0 591 推薦指數:

查看詳情

An attempt was made to call the method com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; but it does not exist. Its class

提升了版本2.7,2.8.2,但是均沒有解決版本沖突的問題,最后發現,是我之前手動添加過gson.jar。刪除即可。比較常規,但是由於用maven管理jar,在pom.xml中找不到沖突的jar所以在這里記錄一下,提個醒。下面是先刪除本地jar之后的現象,再刪除這些就可以了 ...

Thu Jan 10 18:30:00 CST 2019 2 7278
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM