spring -mvc 將對象封裝json返回時刪除掉對象中的屬性注解方式
?
在類名,接口頭上注解使用在?
@JsonIgnoreProperties(value={"comid"}) //希望動態過濾掉的屬性 ?
例
?
@JsonIgnoreProperties(value={"comid"})?
public interface 接口名稱{ ??
} ?
@JsonIgnoreProperties(value={"comid"}) ?
public class 類名{ ??
} ?
該注解使用在get方法頭上
@JsonIgnore
例
@JsonIgnore
public Integer 屬性(){
return 屬性;);
}