一、LocalDate、LocalTime、LocalDateTime
java8 LocalDate、LocalTime、LocalDateTime和Date对比_localdate和date的区别_LETIAN_Z的博客-CSDN博客
LocalDate、LocalTime、LocalDateTime是java8对日期、时间提供的新接口。
实际使用中,
计算日期-------------LocalDate,
计算日期加时刻----LocalDateTime,
只有时刻-------------LocalTime
一篇文章教你如何在项目中正确使用@DateTimeFormat注解和@JsonFormat注解_IT美男子的博客-CSDN博客
@DateTimeFormat
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date date;
@JsonFormat
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date date;