首先 建立一个类型转换类把util包下的date转换为sql包下的dat import java.sql.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; public class MyDateFormat extends SimpleDateFormat { public MyDateFormat(String s) { super(s); } public Date parse(String text) throws ParseException { DateFormat df = null; if(text.length()<=10){ df = new SimpleDateFormat("yyyy-MM-dd"); return new java.sql.Date(df.parse(text).getTime()); } java.util.Date date = super.parse(text); return new java.sql.Date(date.getTime()); } } controller里代码如下: @InitBinder protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { binder.registerCustomEditor(java.sql.Date.class, new CustomDateEditor(new MyDateFormat("yyyy-MM-dd HH:mm:ss"), true)); } 就这么简单。。。。。。。。。