0
点赞
收藏
分享

微信扫一扫

springboot整合redis时报错

水沐由之 2022-05-02 阅读 126
org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received an object of type [com.example.springboot11.entiy.User]

原因是 com.example.springboot11.entiy.User 不能序列化
实体类实现 Serializable 接口就可以了
在这里插入图片描述

举报

相关推荐

0 条评论