解决:cannot deserialize from Object value (no delegate- or property-based Creator)

前因后果:
前两天在写一个简单页面的时候,前端通过ajax请求发送参数,后端创建了一个实体类用来接收参数,这个实体类添加了Lombok的@Data注解,没有创建其他构造函数,当前端发送请求时后端控制台就会抛出以下异常,后经过查询发现原来是因为实体类没有无参构造函数造成的。

解决方式:
手动创建一个无参构造器或者添加Lombok注解@NoArgsConstructor即可。

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class com.thunisoft.commons.cryptoonline.bean.ParamBean]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.thunisoft.commons.cryptoonline.bean.ParamBean` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)at [Source: (PushbackInputStream); line: 1, column: 2]] with root causecom.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.thunisoft.commons.cryptoonline.bean.ParamBean` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)at [Source: (PushbackInputStream); line: 1, column: 2]

解决:cannot deserialize from Object value (no delegate- or property-based Creator)相关推荐

  1. 【已解决】cannot deserialize from Object value 异常

    目录 零.参考文献 一.写在前面 二.问题场景 三.场景重现 服务端代码: 四.解决方案 五.总结反思 六.写在后面 零.参考文献 关于 cannot deserialize from Object ...

  2. 解决:AttributeError: ‘Graph‘ object has no attribute ‘number_of_selfloops‘

    解决:AttributeError: 'Graph' object has no attribute 'number_of_selfloops' 目录 解决:AttributeError: 'Grap ...

  3. 成功解决 class 'AttributeError' : 'Editor' object has no attribute '_Editor__markerMap'

    成功解决 class 'AttributeError' : 'Editor' object has no attribute '_Editor__markerMap' 解决问题 An error lo ...

  4. 成功解决TypeError: a bytes-like object is required, not 'str'

    成功解决TypeError: a bytes-like object is required, not 'str' 目录 解决问题 解决思路 解决方法 解决问题 TypeError: a bytes- ...

  5. 成功解决AttributeError: 'collections.defaultdict' object has no attribute 'iteritems'

    成功解决AttributeError: 'collections.defaultdict' object has no attribute 'iteritems' 目录 解决问题 解决思路 解决方法 ...

  6. 报错解决:AttributeError: ‘Word2VecKeyedVectors‘ object has no attribute ‘save_Word2Vec_format‘

    报错解决:AttributeError: 'Word2VecKeyedVectors' object has no attribute 'save_Word2Vec_format' 不知道按网上自己学 ...

  7. Improved 3D Object Detector Under Snowfall Weather Condition Based on LiDAR Point Cloud

    Improved 3D Object Detector Under Snowfall Weather Condition Based on LiDAR Point Cloud Method Doubl ...

  8. 解决webpack4版本在打包时候出现Cannot read property ‘bindings‘ of null 或 Cannot find module ‘@babel/core‘问题

    解决webpack4版本在打包时候出现Cannot read property 'bindings' of null 或 Cannot find module '@babel/core'问题 参考文章 ...

  9. Javascript 对象不支持此属性或方法,Object doesn’t support this property or method

    中文 Microsoft 对VBscript出现这种错误的解释 Visual Basic 参考:错误消息. 对象不支持此属性或方法(Visual Basic). 为此自动化对象指定的方法或属性不存在 ...

  10. 解决Cannot deserialize instance of `java.util.ArrayList<java.lang.Object>` out of VALUE_STRING

    今天通过PostMan工具来测试一个接口时报这个错误,出现该错误的原因是提交错误的值到后端进行映射,比如在实体类中定义了某个属性类型为List数组,如下图所示: 然后我们在接口提交的值是字符串,如下图 ...

最新文章

  1. vue全家桶 ---axios的使用和二次封装
  2. rabbitmq几种工作模式_RabbitMQ六种队列模式-简单队列模式
  3. _Linux安装软件方法总结
  4. 【转】使用C#发送Http 请求实现模拟登陆(以博客园为例)
  5. 无法连接到RDP服务器
  6. 体验Rabbitmq强大的【优先级队列】之轻松面对现实业务场景
  7. 从二项分布到泊松分布再到正态分布
  8. MySQL架构体系(从一条语句出发了解MySQL各部分的作用)
  9. 综合能源系统及其应用
  10. java基础习题_JAVA基础练习题
  11. 目标管理 - SMART原则
  12. Adams入门详解与实例(第2版)pdf电子书
  13. Speex编解码手册
  14. base64加密后字符串自动换行问题
  15. python如何读取dbf文件_Python如何读取DBF文件
  16. Pytorch tutorial pytorch 入门
  17. app怎么调用mysql数据_教你如何拿别人APP中的数据
  18. mysql火焰图_技术|如何读懂火焰图?
  19. 图片瘦身的正确姿势,让你的 CDN 费用省 50% 以上!
  20. java关键字有什么用_JAVA中关键字有什么用

热门文章

  1. 细说php完美分页类
  2. flask mysql sql注入_Python 中如何防止sql注入
  3. python 直播源地址_斗鱼直播间真实rtmp地址获取(含工具类下载)
  4. 【5年Android从零复盘系列之三十二】Android存储(7):LitePal使用详解
  5. 某CRM旗舰版功能齐全客户管理系统源码
  6. 免费的Web压力测试工具
  7. 苹果ID激活锁查询工具v1.2
  8. 手机CAD如何快速看图下载?
  9. 教你轻松安装Adobe Acrobat XI Pro(编辑PDF使用的)
  10. Nachos编译与使用--Nachos配置