Redis Serializable異常

問題報錯

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

問題原因

沒有實現 Serializable 接口,因爲 Spring 會將對象先序列化再存入 Redis

解決方法


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