使用@JsonFormat注解加载需要接受Date数据的字段上,在接受前端时间的时候会将时间转换为我们需要的格式。
@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date useStartTime;
注意时区
使用@JsonFormat注解加载需要接受Date数据的字段上,在接受前端时间的时候会将时间转换为我们需要的格式。
@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date useStartTime;
注意时区