在使用sringboot的时候因为在配置文件中缺少一个配置项,所以导致查询出来的时间都是long类型的时间格式
因为springboot默认使用的是Jackson
这个时间显然不是我们所需要的,参考官方文档,我们可以设置这两个属性进行修改,一个是格式,一个是时区:
在配置文件中设置:
jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8
重新访问,修改成功!!!!!