1.使用的注解
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@DateTimeFormat(pattern="yyyy-MM-dd")
@JsonFormat 默认是标准时区的时间,多出现少8小时的情况
使用时,按需求加上时区 北京时间 东八区 timezone=”GMT+8”
作用:后台的时间 格式化 发送到前台
@DateTimeFormat 接受前台的时间格式 传到后台的格式