Redis Serializable异常

问题报错

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

问题原因

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

解决方法


public class demo implements Serializable
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章