redisson get()数据报错:

com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property ‘@class’

详细报错信息如下:
com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property '@class'
xxxx
xxxx
[ERROR] 2021-11-29 17:52:59.114 [redisson-netty-2-11] ErrorsLoggingHandler.exceptionCaught(47) - Exception occured. Channel: [id: 0x14385c74, L:/172.16.101.17:60939 - R:xxx.201.34.xxx/xxx.201.34.2xx:6379]
io.netty.handler.codec.DecoderException: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property '@class'at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 104]
xxx
xxx
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Missing type id when trying to resolve subtype of [simple type, class java.lang.Object]: missing type id property '@class'
报错原因:

json序列化转换失败,找不到名为“@class”的property

1. 解决方法一:

① 在实体类上添加注解:

@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS,include = JsonTypeInfo.As.PROPERTY,property = "@class")

② 添加无参构造方法
③ 删除redis数据,重试

2. 解决方法二:

① 修改序列化器,支持以下序列化器,java的序列化使用SerializationCodec

② 实体类实现 Serializable 接口,添加serialVersionUID属性。
③ 删除redis数据,重试

redisson get()数据报错,missing type id property ‘@class’相关推荐

  1. UE4 报错 missing type specifier - int assumed

    没有提示的错误,但是编译时就出现:missing type specifier - int assumed 我出现的原因是在使用MergeActor时, #include "Editor/M ...

  2. JS报错:Cannot read property 'type' of undefined

    在做图片上传功能的时候,遇到了JS无法识别图片type的问题,在使用过程中是没有问题的,但是不知道为什么浏览器的Console报这个错误: Uncaught TypeError: Cannot rea ...

  3. ES插入date类型数据报错failed to parse field [case_date] of type [date]

    ES插入date类型数据报错 mapping信息如下 {"mappings": {"_doc": {"properties": {" ...

  4. 用Java向SQL Server数据库中插入float数据报错An error occurred while converting the Float value to JDBC data type

    作者:翁松秀 用Java向SQL Server数据库中插入float数据报错 用Java向SQL Server数据库中插入float数据报错 报错信息: 报错原因: 解决方案: 报错信息: An er ...

  5. Extra Data after Last Expected Column:hawq建外表load数据报错

    背景:使用sqoop import 才oracle抽数据入HDFS后,通过pxf建立hawq外表,查询数据报错 解决思路:1.从报错上看应该是数据源分割后字段数比目标表字段多,且pgadmin3里报错 ...

  6. python response.json()报错_Django JsonResponse json格式报错 解决Django响应JsonResponse返回json格式数据报错问题...

    想了解解决Django响应JsonResponse返回json格式数据报错问题的相关内容吗,彭世瑜在本文为您仔细讲解Django JsonResponse json格式报错的相关知识和一些Code实例 ...

  7. Format specifies type 'id' but the argument has type 'NSError *__autoreleasing *

    我想打印error,但是出现了标题中的错误,代码如下: -(id)yobee_responseObjectForResponse:(NSURLResponse *)response data:(NSD ...

  8. Yii框架控制台报错: The id configuration for the Application is required

    一.背景 博主新接手的项目是使用Yii框架开发的,在使用yii的控制台命令的时候报错:The "id" configuration for the Application is r ...

  9. python response.json()报错_解决Django响应JsonResponse返回json格式数据报错问题

    解决Django响应JsonResponse返回json格式数据报错问题,给大家,报错,代码,图书,希望能 解决Django响应JsonResponse返回json格式数据报错问题 易采站长站,站长之 ...

最新文章

  1. 从原理到落地,七大维度详解矩阵分解推荐算法
  2. 浅谈(线性)卷积公式为什么要翻转
  3. 使用matlab做可重复性实验结果——rng
  4. go map并发写错误问题
  5. 结对编程 黄金点游戏
  6. Theano mnist数据集格式
  7. 信息学奥赛一本通(1066:满足条件的数累加)
  8. 离散效率写给自己的话 二
  9. 深度学习与人类语言处理-语音识别(part1)
  10. collectionutils包_CollectionUtils工具类的常用方法
  11. 当前网络存在的安全问题
  12. 系统分析与设计课程总结
  13. 如何正确使用条码标签打印软件
  14. 苹果手机备份数据到电脑什么位置 iPhone备份到电脑上的东西在哪里
  15. 八戒帮扶V5微信公众平台任务系统完美运营v1.5.8
  16. java prase xml error
  17. SpringBoot系列之(二):2.注解
  18. win7的Par虚拟机版优化(parellel desktop)
  19. 半监督学习:semi-supervised learning 直推学习:transductive learning 主动学习:active learning
  20. 学习笔记15--机器人操作系统

热门文章

  1. 【Spring】spring基于注解的声明式事务控制
  2. 通俗理解tf.nn.conv2d() tf.nn.conv3d( )参数的含义 pytorhc 卷积
  3. 房价预测-paddle 实现
  4. NLP --- 条件随机场CRF详解 重点 特征函数 转移矩阵
  5. tf.placeholder函数说明
  6. HMM(隐马尔科夫)用于中文分词
  7. Python os.getcwd() 方法
  8. LeetCode简单题之检查单词是否为句中其他单词的前缀
  9. PyTorch Data Parrallel数据并行
  10. ML Pipelines管道