标签:
springMVC 这处理表单时间时,会截断时间

解决办法:在control里绑定时间处理方法
//绑定时间处理方法
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
绑定后正常了

页面显示可以用fmt标签

标签:
原文地址:http://www.cnblogs.com/zenzzat/p/5561574.html