错误:

org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDAO is not known to the MapperRegistry.

错误:

java.lang.ExceptionInInitializerError

原因1:没有添加mappers

原因2:手动添加

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>

记住这个错误org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDAO is not known to the MapperRegistry.的更多相关文章

  1. Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.test.bean.groupMapper is not known to the MapperRegistry.

    Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com. ...

  2. 报错org.apache.ibatis.binding.BindingException: Type interface com.atguigu.mybatis.bean.dao.EmployeeMapper is not known to the MapperRegistry.

    报错org.apache.ibatis.binding.BindingException: Type interface com.atguigu.mybatis.bean.dao.EmployeeMa ...

  3. MyBatis—— org.apache.ibatis.binding.BindingException: Type interface com.web.mybatis.i.PersonMapper is not known to the MapperRegistry.

    报错信息: Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interfac ...

  4. org.apache.ibatis.binding.BindingException: Type interface XXX is not known to the MapperRegistry.

    动态代理因为namespace的地方写错了

  5. MyBatis典型的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    XXXmapper.java(接口) XXXmapper.xml(结果集映射) //此两个文件要在统一包下,且xml中的namespace是唯一的,为了区分须写成 该xml的全路径

  6. mybatis运行出现org.apache.ibatis.binding.BindingException

    今天学习mybatis的第一天,发现用junit测试报出了次异常:org.apache.ibatis.binding.BindingException: Type interface cn.dzp.d ...

  7. org.apache.ibatis.binding.BindingException: Mapper method 'attempted to return null from a method with a primitive return type (long).

    一.问题描述 今天发现测试环境报出来一个数据库相关的错误 org.apache.ibatis.binding.BindingException: Mapper method 'attempted to ...

  8. springboot2 中Druid和ibatis(baomidou) 遇到org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.iflytek.pandaai.service.multi.mapper.TanancyMapper

    调用mapper中任何方法都会出现类似的错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not foun ...

  9. 解决 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 以及MyBatis批量加载xml映射文件的方式

    错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 的出现,意味着项目需要xml文件来 ...

  10. org.apache.ibatis.binding.BindingException

    1.异常提示: org.apache.ibatis.binding.BindingException: Mapper method 'com.artup.dao.WorksDao.selectWork ...

随机推荐

  1. C# 数据结构之嵌套加法、嵌套乘法

    复杂性度量问题 1.大O复杂度:嵌套加法 找出以下代码片段的 Big O 复杂度. using System; namespace Chapter_1 { class Challenge_1 { st ...

  2. python 的钩子函数

    一.什么是钩子函数 hook函数就是在一定条件下才会执行的函数,将自己实现的函数挂载到挂载点上 1. hook函数:就是我们自己实现的函数,函数类型与挂载点匹配(返回值,参数列表)2. 挂接:也就是h ...

  3. Excel比较两列是否相等

    通常的方式: 先将两列排序 通过判定如 =A1=B1 或者ctrl + \ (mac 是 command) 可以定位到差异的那行

  4. RSTP-快速生成树协议

    1 STP的不足之处STP协议虽然能够解决环路问题,但是由于网络拓扑收敛慢,影响了用户通信质量. 2 RSTP概述RSTP在许多方面对STP进行了优化,它的收敛速度更快,而且能够兼容STP. 通过接口 ...

  5. springBoot中对mongodb添加2dsphere位置索引

    项目需求:最近有个需求,就是要根据坐标位置找出附近的车辆(车辆有对应的坐标).然后翻了翻百度,cv流一顿操作之后,大概整理出来了一段代码如下 //根据当前位置坐标,找出附近*米内的所有车辆BasicD ...

  6. Java lombok包中的常用注解,便捷化开发POJO类

    lombok包中的一些常用注解 如何使用Lombok?Lombok提供注解方式来提高代码的简洁性,常用注解有:    @Data    @Setter @Getter    @NonNull    @ ...

  7. 数据库管理工具naicat+DG

    DG 参考链接:https://www.cnblogs.com/zuge/p/7397255.html 自我感觉: 亲切,万能,idea用多了... 石皮 解 用学生账号登陆就可以(我用的这一种) 工 ...

  8. Feign组件

    一.简介 Feign是Netflix开发的声明式,模块化的HTTP客户端 1 导入依赖 <dependency> <groupId>org.springframework.cl ...

  9. leetcode 94. 二叉树的中序遍历【时间击败99.19%】 【内存击败39.48%】

    public List<Integer> inorderTraversal(TreeNode root) { ArrayList<Integer>al=new ArrayLis ...

  10. 8.golang语言学习,运算符介绍

    1.算术运算 自增,自减,只能单独使用,++,--只能写在变量后面 2.赋值运算符 优先级,单目运算,赋值运算从右到左运算,其余从左到右,无三目运算,用if实现 3.比较运算符/关系 4.逻辑运算符 ...