1、LocalDateTime的序列化
Redis的jackson不支持LocalDateTime时间类
Request processing failed; nested exception is
org.springframework.data.redis.serializer.SerializationException: Could not write JSON: Java 8
date/time type `java.time.LocalDateTime` not supported by default: add Module
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference
chain: com.my.seckill.dao.pojo.GoodsVo["startDate"]); nested exception is
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type
`java.time.LocalDateTime` not supported
解决方案:
1)添加依赖
<!-- jackson-datatype-jsr310 -->