1,项目最近改了点东西,今天往redis缓存里存入内容时报错了,如下:
Failed to serialize object using DefaultSerializer;
nested exception is java.lang.IllegalArgumentException: DefaultSerializer
requires a Serializable payload but received an object of type [com.xxx.po.UserInfoPo]
2,查找资料才发现上面要缓存的对象没有实现 Serializable接口,果然实现Serializable接口后就不报错了
public class UserInfoPo extends BasePo implements Serializable {
}
完