美文网首页
hibernate和mybaits日期数据类型

hibernate和mybaits日期数据类型

作者: 小男人_cb75 | 来源:发表于2017-04-30 11:04 被阅读0次

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

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

    private void InitBinder(ServletRequestDataBinder binder) {

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

    相关文章

      网友评论

          本文标题:hibernate和mybaits日期数据类型

          本文链接:https://www.haomeiwen.com/subject/pizttxtx.html