美文网首页
@JsonIgnore和@JsonSerialize

@JsonIgnore和@JsonSerialize

作者: 崔可仁 | 来源:发表于2019-06-18 11:57 被阅读0次

@JsonIgnore的作用是json序列化时将java bean中的一些属性忽略掉,前台接受到的json对象中会忽略掉该字段

@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL) 类序列化为Json时不返回null对象,key也会消失

相关文章

网友评论

      本文标题:@JsonIgnore和@JsonSerialize

      本文链接:https://www.haomeiwen.com/subject/uaoxqctx.html