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:点击这里

  • 相关阅读:
    shell脚本-awk
    shell脚本-sed命令
    shell脚本-grep和正则表达式
    wuti
    dmesg、stat命令
    uname、hostname命令
    tee、vi/vim命令
    tr、od命令
    vimdiff、rev命令
    dos2unix、diff命令
  • 原文地址:https://www.cnblogs.com/a1111/p/7459758.html
Copyright © 2011-2022 走看看