若页面时间参数显示一串阿拉伯数字,但数据库存入的时间数据正常.

如图所示:

时间显示成一串阿拉伯数字

解决方案:

在你的pojo类上添加一个注解就可以了.

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtCreate=new Date();
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date gmtUpdate;
结果如下:

时间显示成一串阿拉伯数字



相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-12-06
  • 2021-08-22
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-10-12
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
相关资源
相似解决方案