- 以键值对的方式打印一个对象的属性
User user = new User();
String ClassInfo = ReflectionToStringBuilder.toString(user, ToStringStyle.MULTI_LINE_STYLE);
- Java8新增时间处理类,有时间查看一下API
Date date = new Date(LocalDateTime.now().plusYears(1).atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
- Apache.Commons.Lang包的生成随机数
String orderNumber = RandomStringUtils.randomNumeric(8);