1.判断集合是否为空?
CollectionUtils.isEmpty(itemCat2)
2.忽略实体类中的字段与数据库表中的字段建立映射关系
@Transient private Long cid;
3.将字符串转换为日期格式?
@DateTimeFormat(pattern="yyyy-MM-dd")
4.手动设置返回类型(返回字符串)
produces = MediaType.TEXT_PLAIN_VALUE
5.序列化时,忽略该字段
@JsonIgnore private String password;
6.序列化后的名字
@JsonProperty("u") private String url;