一个打包类为restful控制器返回,有三个成员变量: code,msg,data.Statement类的数据是Object.data可以是任何entity class.Some成员的entity不应该出现在返回我知道@JsonView上的一个接口和get方法可以控制成员appear.But它是否控制data.Controller方法中的成员返回结果类中的代码、消息、数据
public class Result
我正在尝试使用@JsonIgnore + morphia + jackson (下拉向导的默认设置)的组合,但是我无法让@JsonIgnoreProperties或can工作。我尝试过@JsonIgnoreProperties对我不希望暴露给API使用者的属性的类定义(密码和盐),我也尝试过对字段声明本身以及getter和setter的每一个排列的@JsonIgnore。person; t
Jackson @JsonIgnoreProperties没有忽略possibleTargets,而是忽略了owner和lemf .How,我可以忽略列表。@JsonIgnoreProperties( {"owner","lemf"," possibleTargets"} )public class Warrant extends Nameable