Redis:Serializable异常完美解决方案

问题报错

DefaultSerializer requires a Serializable payload but received an object of type [******]

问题原因

没有实现 Serializable 接口,因为 Spring 会将对象先序列化再存入 Redis

解决方法


public class demo implements Serializable

猜你喜欢

转载自blog.csdn.net/l_mloveforever/article/details/105776203