springmvc 请求出现400错误(当传入的参数类型是Date时加上下面代码试试)

@InitBinder
 protected void initBinder(HttpServletRequest request,
   ServletRequestDataBinder binder) throws Exception {
  binder.registerCustomEditor(Date.class, new DatePropertyEditor(yourDateformat));
 }

 

posted @ 2016-01-13 15:38  阿若蜜意  阅读(1410)  评论(0编辑  收藏  举报