关于 springmvc后端时间戳传入到前端,时间是Long,String
关于 springmvc后端时间戳传入到前端,时间是Long,String
解决方法:
在实体类的Date 属性加上两个必要的注解:
@DateTimeFormat(pattern = “yyyy-MM-dd HH:mm:ss”)
@JSONField(format = “yyyy-MM-dd HH:mm:ss”)
在spring-mvc.xml中添加以下内容:
<mvc:annotation-driven>
<!-- 添加消息转换器 解决json数
原创
2020-12-18 21:11:25 ·
680 阅读 ·
2 评论