前端传递的时间戳不带毫秒值
{"time":1686192136}
后端使用date类型解析,使用了注解
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date time;
接收返回为:time:"1970-01-20T22:20:25.688Z"
前端传递的时间戳不带毫秒值
{"time":1686192136}
后端使用date类型解析,使用了注解
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date time;
接收返回为:time:"1970-01-20T22:20:25.688Z"