在实体类中加入
@JsonInclude(JsonInclude.Include.NON_NULL)
举例:
public class RestResponseimplements Serializable { private String code; private String msg; @JsonInclude(JsonInclude.Include.NON_NULL) private T data; }
欢迎分享,转载请注明来源:内存溢出
在实体类中加入
@JsonInclude(JsonInclude.Include.NON_NULL)
举例:
public class RestResponseimplements Serializable { private String code; private String msg; @JsonInclude(JsonInclude.Include.NON_NULL) private T data; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)