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

    今天在做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里面一句一句的看,直到我看到:

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

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

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

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

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

  • 相关阅读:
    angular 复选框回选
    $parse
    AngularJS 指令的 Scope (作用域)
    文献解读 (1)
    献给初学者:常用的细胞凋亡检测方法
    KofamKOALA
    Dfam.h5.gz下载
    Augustus-3.3.3安装
    bamtools 2.5.1安装
    R语言从原点开始作图
  • 原文地址:https://www.cnblogs.com/a1111/p/12816329.html
Copyright © 2011-2022 走看看