摘要: 1. jsonToBean时,json中有的字段,bean中没有 无法匹配时,忽略此字段,不抛出异常(默认是抛出异常的) 方案一(局部):在class上加 @JsonIgnoreProperties(ignoreUnknown = true) public class tes 方案二(局部或全局)或 阅读全文
posted @ 2017-03-29 17:35 del88 阅读(3620) 评论(0) 推荐(0) 编辑
摘要: DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //方法1(推荐,功能强大灵活多变) Calendar calendar = Calendar.getInstance(); calendar.add(Calen 阅读全文
posted @ 2017-03-29 11:09 del88 阅读(762) 评论(0) 推荐(1) 编辑