关于springboot传递前端变成时间戳的问题

在使用springboot进行项目开发的时候在前端页面无法显示正确的时间

  在application.xml中加入:
      spring.jackson.time-zone=GMT+8
       spring.jackson.date-format=yyyy-MM-dd 
     这两个配置

或者使用@JsonFormat(pattern=”yyyy-MM-dd HH:mm:ss”,timezone=”GMT+8”),放在实体类的属性上

猜你喜欢

转载自blog.csdn.net/chh0912/article/details/82184661