在属性中加上@JsonFormat注解即可,后面时区为东八区时间
例:
@Column(name = “update_date”)
@JsonFormat(pattern =“yyyy-MM-dd HH:mm:ss”, timezone = “GMT+08:00”)
private Date updateDate;
java关于数据查询返回时间格式为时间戳问题
猜你喜欢
转载自blog.csdn.net/java1703/article/details/88733405
今日推荐
周排行