@JsonInclude(JsonInclude.Include.NON_NULL)
Null数据的字段返回前端的时候没有这个字段
1.注解使用在 类名,接口头上
@JsonIgnoreProperties(value={"comid"}) //希望动态过滤掉的属性
例
[html] view plain copy
@JsonIgnoreProperties(value={"comid"})
public interface CompanyFilter{
}
2。该注解使用在get方法头上
@JsonIgnore
例
[html] view plain copy
@JsonIgnore
public Integer getPageSize(){
return Integer.valueOf(getRows()==null?"0":getRows().toString());
}
Null数据的字段返回前端的时候没有这个字段
1.注解使用在 类名,接口头上
@JsonIgnoreProperties(value={"comid"}) //希望动态过滤掉的属性
例
[html] view plain copy
@JsonIgnoreProperties(value={"comid"})
public interface CompanyFilter{
}
2。该注解使用在get方法头上
@JsonIgnore
例
[html] view plain copy
@JsonIgnore
public Integer getPageSize(){
return Integer.valueOf(getRows()==null?"0":getRows().toString());
}