在domain层的时间属性上面加@JsonFormat和@DateTimeFormat注解
后端传前端: GMT+8:表示东八区
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
前端传后端:
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
通过@JsonFormat和@DateTimeFormat,解决前后端时间格式问题
阅读 42
2023-11-06
在domain层的时间属性上面加@JsonFormat和@DateTimeFormat注解
后端传前端: GMT+8:表示东八区
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
前端传后端:
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
相关推荐
精彩评论(0)