springmvc4 自动转 json 过滤null

model 中添加注解 @JsonInclude(JsonInclude.Include.NON_NULL)

注:springmvc 3中用   @JsonSerialize(include=Inclusion.NON_NULL)


你可能感兴趣的:(springmvc4 自动转 json 过滤null)