springboot 编译打包报错:The following method did not exist:com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-23 14:50:45.110 ERROR 39880 --- [           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:java.lang.invoke.MethodHandleNatives.resolve(Native Method)The following method did not exist:com.google.gson.GsonBuilder.setLenient()Lcom/google/gson/GsonBuilder;The method's class, com.google.gson.GsonBuilder, is available from the following locations:jar:file:/E:/maven_repository_new/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar!/com/google/gson/GsonBuilder.classIt was loaded from the following location:file:/E:/maven_repository_new/com/google/code/gson/gson/2.2.4/gson-2.2.4.jarAction:Correct the classpath of your application so that it contains a single, compatible version of com.google.gson.GsonBuilder2019-10-23 14:50:45.115 ERROR 39880 --- [           main] o.s.test.context.TestContextManager      : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.Servlet
TestExecutionListener@659499f1] to prepare test instance [com.yydrobo.video_call.VideoCallApplicationTests@26f96b85]

解决:
将gson版本升级为 2.6.2

        <dependency><groupId>com.google.code.gson</groupId><artifactId>gson</artifactId><version>2.6.2</version></dependency>

The following method did not exist:com.google.gson.GsonBuilder.setLenient()相关推荐

  1. Google GSON GsonBuilder().setDateFormat(yyyy-MM-dd HH:mm:ss)不能格式化Data

    Google GSON GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss")不能格式化Data 在项目中遇到问题,数据库中保存的时间 ...

  2. Google Gson的使用方法及JSON 技术对比

    为什么80%的码农都做不了架构师?>>>    一 .各个JSON技术的简介和优劣 1.json-lib json-lib最开始的也是应用最广泛的json解析工具,json-lib ...

  3. 使用Google GSON:额外的赠品:第二部分

    如果您错过了系列的第一篇文章 ,我们将继续上一篇文章的"使用GSON " ,这里是link . 因此,这里我们进行另一系列的讨论. 版本支持 如果要维护一个对象的多个版本以进行JS ...

  4. 使用Google GSON:额外的赠品:第一部分

    介绍 这是以前的Google GSON入门的后续文章,其中显示了有关使用Google Gson的入门资料. 本文显示了GSON库的一些其他优点. 由于有很多关于这些额外功能的文章要写,所以我将长篇文章 ...

  5. Google Gson

    JackSon简单用法        FastJson简单用法 一.Gson介绍 1.什么是Gson Gson 是 Google 开发的Java API,是一个简单基于Java的开源库,可以相互转换J ...

  6. Error: <spyOn> : handleError() method does not exist

    单元测试出错: Error: : handleError() method does not exist Usage: spyOn(, ) at at UserContext.apply (http: ...

  7. springcloud-eureka启动报错,提示The following method did not exist: org.springframework.boot.actuate.health

    报错信息汇总 文章目录 报错信息汇总 1.springcloud-eureka启动报错,提示The following method did not exist: org.springframewor ...

  8. java 解析gson_使用Java和Google GSON解析ESPN API

    java 解析gson 在我的第一篇文章中,我将解释如何解析ESPN API. 可以在http://developer.espn.com/docs上找到API文档. 首先,您需要请求一个API密钥,然 ...

  9. 使用Java和Google GSON解析ESPN API

    在我的第一篇文章中,我将解释如何解析ESPN API. 可以在http://developer.espn.com/docs上找到API文档. 首先,您需要请求一个API密钥,然后可以开始查询REST ...

  10. Android Gson类型转换错误解决 com.google.gson.internal.LinkedTreeMap

    com.google.gson.internal.LinkedTreeMap不能转换到我的类(com.google.gson.internal.LinkedTreeMap cannot be cast ...

最新文章

  1. 软件架构设计之常用架构模式
  2. UOJ #310 黎明前的巧克力 (FWT)
  3. 短小精悍的多源最短路径算法—Floyd算法
  4. Android反编工具的使用-Android Killer
  5. 自定义ViewGroup(1)
  6. 如何把图片转为html,如何将原始十六进制图像转换为html图像
  7. linux 命令分号,linux命令之间的分号,, ||
  8. 每天看一片代码系列(三):codepen上一个音乐播放器的实现
  9. linux mii,Linux mii-tool 命令用法详解-Linux命令大全(手册)
  10. eclipse svn插件安装_PHP 安装
  11. 斐波那契java编写_请编写一个Java程序的斐波那契数
  12. 关于html中利用jQuery选择子节点方法总结——待续
  13. 浅谈SpringAOP功能源码执行逻辑
  14. 【数据分析入门】R语言绘图语句总结
  15. 二极管和三极管介绍-二极管和三极管的区别及工作原理详解-KIA MOS管
  16. VUE不同路由地址跳转相同页面,页面数据根据不同参数刷新
  17. 锐龙R3 4300U怎么样 相当于什么水平
  18. 虚拟机或公有云搭建wordpress博客
  19. 微信小程序 基本认识
  20. 【CSS】尺寸和边框、盒子模型、外边距_02

热门文章

  1. java 裁剪 pdf_Java 合并、拆分PDF文档
  2. 第三方定量定性质谱检测技术实验
  3. 第三方定量定性检测质谱实验
  4. 如何按比例裁剪图片?怎样改变图片形状?
  5. PreaparedStatement中execut的使用
  6. Ubuntu 查看分区的磁盘格式
  7. MyBatis 报错The error may exist in…….xml
  8. 【小程序】快来开发你的第一个微信小游戏(详细流程)
  9. Android 设计素材积累(九层之台起于垒土)
  10. 小额批量支付系统可以完成跨行资金清算吗_今天,你转账了吗?带你看懂央行小额批量支付系统...