14
从Spring MVC作为JSON发送时动态忽略Java对象中的字段
我有这样的模型类,用于休眠 @Entity @Table(name = "user", catalog = "userdb") @JsonIgnoreProperties(ignoreUnknown = true) public class User implements java.io.Serializable { private Integer userId; private String userName; private String emailId; private String encryptedPwd; private String createdBy; private String updatedBy; @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "UserId", unique = true, nullable = false) public Integer …
105
java
json
hibernate
spring-mvc