SpringMVC 出现"The request sent by the client was syntactically incorrect ()"解决办法

来源:互联网 发布:linux nas挂载 编辑:程序博客网 时间:2024/06/08 15:55

问题描述:
这里写图片描述

原因:
Spring在转换日期出错

解决方法:
在Controller中添加

@InitBinderpublic void initBinder(WebDataBinder binder) {     SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");     dateFormat.setLenient(false);     binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); }
阅读全文
0 0