1.注解使用在 類名,接口頭上
@JsonIgnoreProperties(value={"comid"}) //希望動態過濾掉的屬性
例
@JsonIgnoreProperties(value={"comid"}) public interface CompanyFilter{
2.該注解使用在get方法頭上
@JsonIgnore
例
@JsonIgnore public Integer getPageSize(){ return Integer.valueOf(getRows()==null?"0":getRows().toString()); }
本文轉自:https://blog.csdn.net/sanjay_f/article/details/47304509