Spring中时间格式注解@DateTimeFormat
摘要:
在SpringMVC中Controller中方法参数为Date类型想要限定请求传入时间格式时,可以通过@DateTimeFormat来指定,但请求传入参数与指定格式不符时,会返回400错误。 如果在Bean属性中有Date类型字段,想再序列化转为指定格式时,也可用@DateTimeFormat来指定 阅读全文
posted @ 2019-03-08 08:33 时间朋友 阅读(29902) 评论(0) 推荐(0)
浙公网安备 33010602011771号