A packing class for restful controller return ,has three member variable: code, msg, data.Statement class of data is Object.data may be any entity class.Some members of entity should not appear in the return Json.Is there some way to config ?
I had know @JsonView upon a interface and get method can control whether member appear.But it controll code, msg, data not the member in data.Controller method return Result class like this
public class Result{
  private String code;
  private String msg;
  private User user;
}
public class User {
 private String userName;
 private String password;
}
I expect the result Json without password like this
{
  "code":1,
  "msg":"",
  "data":{
    "userName":"Ted"
   }
}
not like
{
  "code":1,
  "msg":"",
  "data":{
    "userName":"Ted",
    "password":"Tedisbear"
  }
}
 
     
    