hibernate和mybaits日期数据类型

@InitBinder//SpringMvc增加时间要写重写这个方法

// spring mvc对时间格式做处理,如果不写则要报Bind错误

private void InitBinder(ServletRequestDataBinder binder) {

binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true));}

你可能感兴趣的:(hibernate和mybaits日期数据类型)