SpringBoot接收对象中包含时间参数,格式化接收时间

2021-09-29 00:14

阅读:617

标签:att   对象   for   nbsp   orm   class   mamicode   技术   图片    SpringBoot接收对象中包含时间参数,前端传过来的时间数据为‘2019-12-19 08:08:08‘,SpringBoot不能自己转化时间为Date,会报错。 解决办法: 使用@JsonFormat注解 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  SpringBoot接收对象中包含时间参数,格式化接收时间标签:att   对象   for   nbsp   orm   class   mamicode   技术   图片   原文地址:https://www.cnblogs.com/mxh-java/p/12070539.html


评论


亲,登录后才可以留言!