解决Type interface com.kuang.mapper.UserMapper is not known to the MapperRegistry.的问题

错误代码:

二月 13, 2022 7:43:04 下午 org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
信息: Loaded JDBC driver: com.mysql.cj.jdbc.Driver
二月 13, 2022 7:43:05 下午 org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl warn
警告: Property 'mapperLocations' was specified but matching resources are not found.
Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.kuang.mapper.UserMapper is not known to the MapperRegistry.at org.apache.ibatis.binding.MapperRegistry.getMapper(MapperRegistry.java:47)at org.apache.ibatis.session.Configuration.getMapper(Configuration.java:779)at org.mybatis.spring.SqlSessionTemplate.getMapper(SqlSessionTemplate.java:311)at com.kuang.mapper.UserMapperImpl.selectUser(UserMapperImpl.java:19)at MyTest.main(MyTest.java:10)

经过检查发现,target中未生成 UserMapper.xml文件。

暂时的解决办法是把以前文件中的 target -->classes-->com-->kuang-->mapper中的UserMapper.xml文件复制下来,粘贴到现在那个文件的target同样位置中,非常的治标不治本。

或者重新创建一个项目,编写同样的代码。感觉可能是创建项目的时候idea出错的问题。

暂未找到解决方法

看了四个小时属实是心态崩了,记录下来等level更高之后再尝试解决。

路径:spring-study  -->  spring-12-transaction

解决Type interface com.kuang.mapper.UserMapper is not known to the MapperRegistry.的问题相关推荐

  1. Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry

    Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry报错信息 出现了这个问题一般是因为myba ...

  2. Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry. 解决方法

    我错误的找了很多文章都没说到点子上,因为我的映射文件是放在resources文件夹下面, 但是我在引入映射文件的时候是 <mappers><mapper class="ma ...

  3. Type interface com.zhaoka.mapper.DatKcardKmMapper is not known to the MapperRegistry

    Type interface com.zhaoka.mapper.DatKcardKmMapper is not known to the MapperRegistry   没有在sqlConfig. ...

  4. Type interface com.aiit.mapper.BrandMapper is not known to the MapperRegistry.解决办法

    编译出现错误 原因分析 一般出现MapperRegistry.异常时,我们应该安装以下步骤进行排查: 检查 SqlMapConfig.xml 中有没有配置 mapper 路径 检查 SqlMapCon ...

  5. BUG之Type interface com.zcy.mapper.UserLogMapper is not known to the MapperRegistry.

    遇到上面这个问题是因为我在注册mapper的时候少写了UserLogMapper 少写了注册mapper就会报这个错

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

    错误:绑定异常 org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDao is not know ...

  7. Type interface mapper.UserMapper is not known to the MapperRegistry

    Type interface mapper.UserMapper is not known to the MapperRegistry. 报错:Type interface mapper.UserMa ...

  8. 关于Type interface mapper.UserMapper is not known to the MapperRegistry.问题

    关于Type interface mapper.UserMapper is not known to the MapperRegistry.问题 最近正在学习Mybatis-Spring的使用方法,今 ...

  9. SpringBoot:Consider defining a bean of type 'com.wzw.blog.mapper.UserMapper' in your configuration.

    今天使用SpringBoot整合Mybatis时遇到一个错误. *************************** APPLICATION FAILED TO START ************ ...

最新文章

  1. Unity协程截图,WWWForm、WWW配合上传
  2. 大学生计算机基础excel视频,大学生计算机基础Excel.doc
  3. python绘制直方图根据不同分类_如何在python中绘制具有多个类别的直方图
  4. Ubuntu mysql数据库导入sql文件
  5. 高通、猎户机型Android典型bootloader分析
  6. python抓取网站URL小工具
  7. 【转】03.Dicom 学习笔记-DICOM C-Get 消息服务
  8. Ubuntu 14.04 安装 WPS
  9. python 将二维数组旋转_python 二维数组90°旋转
  10. Activity 关于生命周期一些问题的实践验证
  11. kettle将文件路径定义为_Kettle变量和自己定义java代码的实例应用
  12. win10浏览器闪退_Win10专业版下Edge浏览器闪退的多种解决技巧
  13. C语言全局变量和局部变量的区别详解
  14. 身份证,邮箱等的验证
  15. chrome regedit 崩溃_谷歌浏览器网页崩溃的解决方法
  16. 减法公式运算法则_小学所有的运算定律和什么叫加法什么叫减法,乘法a+b=c什么的公式也要...
  17. TFT和STN液晶区别
  18. php聊天室禁言时间开发,聊天室技术(五) -- 指挥中心_PHP
  19. 解决微信小程序数据渲染缓慢或卡顿的方法
  20. 怎么更改锁定计算机背景图片,电脑锁屏背景图片如何更改

热门文章

  1. 面向对象编程实验课随笔(承继下的构造函数和析构函数)
  2. python小游戏毕设 坦克大战小游戏设计与实现 (源码)
  3. 一个优秀的领导者,无非就这3点
  4. 协同过滤系统的评价标准
  5. 实现一个C语言版本的圣诞树(附源代码)
  6. FT1248程序(FT232H,FT220X)
  7. 蒂特ft232_[经验分享] 最近调试FT232H遇到的坑
  8. 爬取漫画网站漫画(爬虫学习)
  9. 第12课 习题讲解
  10. ILRuntime篇:前言