The request sent by the client was syntactically incorrect问题解决

The request sent by the client was syntactically incorrect意思嘛,google翻译一下

通过日志不难看出,是由参数不匹配造成的。

所以对于Date日期转换问题解决方法是

 

在相应的controller中添加如下代码:

@InitBinder
protected void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}

 

当然,也不乏别的类型造成的,根据个人情况而定吧。。。

posted @ 2017-07-06 20:58  赤子说  阅读(265)  评论(0)    收藏  举报