在application.properties中添加

spring.jackson.serialization.write-dates-as-timestamps= true

在application.yml中添加

spring

 jackson:

    default-property-inclusion: NON_NULL

    #date-format: yyyy-MM-dd HH:mm:ss

    time-zone: GMT+8

     serialization:

          write-dates-as-timestamps: true

作者:Juvenile_xf
来源:CSDN
原文:https://blog.csdn.net/qq_31230915/article/details/80225645
版权声明:本文为博主原创文章,转载请附上博文链接!

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐