zoukankan      html  css  js  c++  java
  • mybatis报错Type interface xxx.Dao is not...

      今天在做mybatis的时候,遇到一个错误,大家看看这个错误吧:org.apache.ibatis.binding.BindingException: Type interface cn.mybatis_chop10_1.dao.IEmpDao is not known to the MapperRegistry.

               我前找找后找找,就是找不出来,上网也没有找到具体的解决方式,于是,我就开始从mybatis-config.xml  到dao,再到Mapper.xm里面一句一句的看,直到我看到:

    [html] view plain copy print?

    1. <mapper namespace="cn.mybatis_chop10_1.dao.EmpMapper">  


    这一行的时候,瞬间恍然大悟,原来是后面的EmpMapper写错了,把它改掉就行,比如我的是:

    [html] view plain copy print?

    1. <mapper namespace="cn.mybatis_chop10_1.dao.IEmpDao">  


         在此告诉下大家,一定要细心,细心,再细心!!!尤其是重命名或者Ctrl+C,Ctrl+V的时候,格外注意!!!

           最后在推荐一篇:mybatis反向生成实体类,dao层,Mapper:点击这里

  • 相关阅读:
    Jsp 4—— 内置对象
    Jsp 3—— 声明语法
    Jsp 2—— 小脚本
    CF1479B1 Painting the Array I
    P5337 [TJOI2019]甲苯先生的字符串
    CF19C Deletion of Repeats
    CF484D Kindergarten
    CF529B Group Photo 2 (online mirror version)
    CF1068B LCM
    CF554A Kyoya and Photobooks
  • 原文地址:https://www.cnblogs.com/a1111/p/14877531.html
Copyright © 2011-2022 走看看