SpringBoot 时间显示格式和时区的配置【4】

spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss SSS

    @RequestMapping("/getdate")
    @ResponseBody
    public Date getDate(Date sdate){
        return sdate;
    }

http://localhost/myspringboot/getdate?sdate=1989-10-01

发布了92 篇原创文章 · 获赞 5 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/xfb1989/article/details/104023583
今日推荐