摘要:
在实体对象上添加@JsonAutoDetect , 表明对该实体对象序列化成json串。@JsonAutoDetect public class User{ private int id; private String name; // 省略getter 和 setter }如果不想序列化某个属性,可以使用@JsonIgnoreProperties 进行标记@JsonAutoDetect @JsonIgnoreProperties (value = { "id" , "age" }) public class User{ private int id; 阅读全文
posted @ 2013-12-16 13:47
coreWars
阅读(873)
评论(0)
推荐(0)