在bean对象上加上@JsonInclude(JsonInclude.Include.NON_NULL)这样就会过滤掉为Null的字段。
@JsonInclude(JsonInclude.Include.NON_NULL)