yml文件中这样进行配置

spring:
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss

spring.jackson.date-format
指定日期格式,比如yyyy-MM-dd HH:mm:ss

相关文章: