The following method did not exist: com.google.gson.GsonBuilder.setLenient()

报错完整信息

 

 

原因:因为引入的jar包版本不对, 里面没有com.google.gson.GsonBuilder.setLenient() 这个方法。

解决方案:

1、引入版本对应的jar包

2、排除springBoot中的GsonAutoConfiguration类

@SpringBootApplication(exclude = {GsonAutoConfiguration.class})

 

posted @ 2022-09-07 14:47  云村的王子  阅读(453)  评论(0编辑  收藏  举报