- 把前端传入字符串日期解析成Date
/**
* 把前端传入字符串日期解析成Date
* @author 创建人: 韩威
* @date 创建日期: 2019年9月5日
*/
@InitBinder
protected void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}