翻车现场:DefaultSerializer requires a Serializable payload but received an object of type没有序列化报错
报错:
Caused by: 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.sykj.vo.SyContentArticle]
原因:
因为报错显示的类没有序列化,导致的报错
解决:
只要在相应的类上加上序列化即可
重启运行正常
看完恭喜你,又知道了一点点!!!
你知道的越多,不知道的越多!
~感谢志同道合的你阅读, 你的支持是我学习的最大动力 ! 加油 ,陌生人一起努力,共勉!!
注: 如果本篇有需要改进的地方或错误,欢迎大神们指定一二~~
还没有评论,来说两句吧...