fastjson序列化失败

tianijfeile / 2023-09-03 / 原文

nested exception is com.alibaba.fastjson.JSONException: create instance error, null, public com.hmall.common.pojo.ItemDoc(com.hmall.common.pojo.Item)] with root cause。

原因是实体类中只加了@Data,忘记加@AllArgsConstructor,@NoArgsConstructor