错误如下:
Description:
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:
......
这种情况是GSON依赖版本不对,换成2.6以上版本即可,如:
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->标签:google,attempt,2.6,made,报错,GsonBuilder,setLenient,com,gson From: https://blog.51cto.com/u_15753094/5831048
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
</dependency>