今天在整合redis和spring boot的时候,遇到了一个错误,记录一下. 报错如下: Could not read JSON: Cannot construct instance of `java.time.LocalDateTime` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator) 查看后发
Redis获取缓存异常:java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to XXX. 出现这种异常,我需要自定义ObjectMapper,设置一些参数,而不是直接使用Jackson2JsonRedisSerializer类中黙认的ObjectMapper,看源代码可以知道,Jackson2JsonRedisSerializer中的ObjectMapper是直接使用new ObjectMapper()创建的
解决spring-data-redis操作redis集群报“Jedis does not support password protected Redis Cluster configurations”的异常 原因:使用spring-data-redis操作redis集群时由于redis集群设置了密码. 解决方案:升级spring-data-redis版本即可解决,最后相关jar包版本是:jedis-2.9.0.jarspring-data-redis-1.8.0.M1.jarspring-se
com.alibaba.fastjson.JSONException: expect , actual = at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:) ~[fastjson-.jar:na] at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.jav