Redis缓存查询时报字段无法识别问题-SerializationException: Could not read JSON: Unrecognized xxx
报错信息:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis.serializer.SerializationException: Could not read JSON: Unrecognized field "houseType4Search" (class com.haoke.pojo.Item), not marked as ignorable (15 known properties: "isRented", "img", "price", "city", "sales", "info", "imgs", "rentType", "title", "recommendation", "houseType", "id", "recoSort", "buytime", "link"])
at [Source: (byte[])"{"@class":"com.haoke.pojo.Item","id":"6216363d9ba8811e82099417","title":"北京老小区","sales":300,"recommendation":true,"recoSort":9,"city":"北京","price":3000,"rentType":"整租","houseType":"60 ㎡","houseType4Search":"6/6层|2室1厅-60 ㎡","info":{"@class":"java.util.LinkedHashMap","orientation":"朝南","level":"6/6层","style":"简单装修","type":"2室1厅","years":"2000"},"imgs":["java.util.ArrayList",["http://192.168.136.130:80/group1/M00/00/00/wKiIgmITgQmAF1htAAuC467ZRns833_big"[truncated 368 bytes]; line: 1, column: 228] (through reference chain: com.haoke.pojo.Item["houseType4Search"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "houseType4Search" (class com.haoke.pojo.Item), not marked as ignorable (15 known properties: "isRented", "img", "price", "city", "sales", "info", "imgs", "rentType", "title", "recommendation", "houseType", "id", "recoSort", "buytime", "link"])
at [Source: (byte[])"{"@class":"com.haoke.pojo.Item","id":"6216363d9ba8811e82099417","title":"北京老小区","sales":300,"recommendation":true,"recoSort":9,"city":"北京","price":3000,"rentType":"整租","houseType":"60 ㎡","houseType4Search":"6/6层|2室1厅-60 ㎡","info":{"@class":"java.util.LinkedHashMap","orientation":"朝南","level":"6/6层","style":"简单装修","type":"2室1厅","years":"2000"},"imgs":["java.util.ArrayList",["http://192.168.136.130:80/group1/M00/00/00/wKiIgmITgQmAF1htAAuC467ZRns833_big"[truncated 368 bytes]; line: 1, column: 228] (through reference chain: com.haoke.pojo.Item["houseType4Search"])] with root cause
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?