在domain层的时间属性上面加@JsonFormat和@DateTimeFormat注解
后端传前端: GMT+8:表示东八区
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
前端传后端:
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
微信扫一扫
在domain层的时间属性上面加@JsonFormat和@DateTimeFormat注解
后端传前端: GMT+8:表示东八区
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
前端传后端:
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
相关推荐