1、springboot使用gson()启动的时候报错

最近项目开始使用springboot了,记录下从开始搭建到使用过程中一些技术点,以及出现的问题

An attempt was made to call the method com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder; but it does not exist. Its class, com.google.gson.GsonBuilder, is available from the following locations:

jar:file:/D:/maven/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar!/com/google/gson/GsonBuilder.class

It was loaded from the following location:

file:/D:/maven/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar

 

解决方法:

升级gson的jar包

com.google.code.gson

gson

2.8.5

 

 

你可能感兴趣的:(springboot)