将serverTimezone的配置改为Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/bfc?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useSSL=false

如果此时还解决不了问题 请在返回DTO类/添加中VO类中添加注解  

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")

    private Date createDate;

 

posted on 2020-02-21 13:53  幂次方  阅读(2068)  评论(0)    收藏  举报