轉載:https://blog.csdn.net/xiangluer/article/details/81913137?utm_source=copyspring
參考以下博客:json
https://www.jianshu.com/p/ebe9087b9078mvc
https://blog.csdn.net/xiangluer/article/details/81913137.net
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8orm
spring.mvc.dateFormat = yyyy-MM-dd HH:mm:ssblog
三、也能夠在pojo中對特定的date類型屬性加了如下配置get
@DateTimeFormat來控制入參,@JsonFormat來控制出參博客
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
form