json的设置

@JsonIgnore
//不显示
private String pwd;
private Integer age;
//格式化
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss a" ,locale = "zh" ,timezone = "GMT+8")
private Date birthday;
@JsonInclude(JsonInclude.Include.NON_NULL)
//为空的话就不显示
private String desc;
原文地址:https://www.cnblogs.com/songfahzun/p/8870847.html