springmvc返回json数据去除null值

待我称王封你为后i 2022-06-12 04:19 462阅读 0赞
  1. package com.xilehang.kaola.po.orderConfirm;
  2. import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  3. //转json是排除null
  4. @SuppressWarnings("deprecation")
  5. @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
  6. public class GoodsList {
  7. private int goodsId;
  8. private String skuId;
  9. }

发表评论

表情:
评论列表 (有 0 条评论,462人围观)

还没有评论,来说两句吧...

相关阅读