spring 处理日期 spring日期 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你需要SimpleDateFormat来将字符串转换为Date 使用spring3.2或以上版本,比较方便 bean里面改成string 之后再转过来 spring有initbinder,每次请求action的时候会自动转化一下,或者手动转也可以 @InitBinder public void initBinder(WebDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); } 建议全部改为String 类型, http://blog.csdn.net/lwphk/article/details/42553009 这里可以解决你的问题 java xsl 堵漏:XSS hibernate 配置问题求助 ant build 时遇见的奇怪问题 权限系统(急) OA办公系统中事务共享机制是什么概念 请教 hibernate查询缓存问题~ 再问简单问题!JSP方面的。 用listener在tomcat下實現定時執行 J2EE布署问题! 菜鸟问题,EJB入门级问题,谢谢! Struts2 session问题 js中怎么获取、li 标签中的中的value属性的值
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
}