用Bean 去接受前端表单提交的数据 如果Bean 中有Date 类型的字段
接收如字符串“2016-06-06” 就会报错
需要在Controller 类中加入如下方法
@InitBinder
public void initBinder(WebDataBinder binder){
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
binder.registerCustomEditor(Date.class, new CustomDateEditor(df,false));
}