解决Type interface com.kuang.mapper.UserMapper is not known to the MapperRegistry.的问题
解决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.的问题相关推荐
- 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 ...
- Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry. 解决方法
我错误的找了很多文章都没说到点子上,因为我的映射文件是放在resources文件夹下面, 但是我在引入映射文件的时候是 <mappers><mapper class="ma ...
- 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. ...
- Type interface com.aiit.mapper.BrandMapper is not known to the MapperRegistry.解决办法
编译出现错误 原因分析 一般出现MapperRegistry.异常时,我们应该安装以下步骤进行排查: 检查 SqlMapConfig.xml 中有没有配置 mapper 路径 检查 SqlMapCon ...
- BUG之Type interface com.zcy.mapper.UserLogMapper is not known to the MapperRegistry.
遇到上面这个问题是因为我在注册mapper的时候少写了UserLogMapper 少写了注册mapper就会报这个错
- 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 ...
- Type interface mapper.UserMapper is not known to the MapperRegistry
Type interface mapper.UserMapper is not known to the MapperRegistry. 报错:Type interface mapper.UserMa ...
- 关于Type interface mapper.UserMapper is not known to the MapperRegistry.问题
关于Type interface mapper.UserMapper is not known to the MapperRegistry.问题 最近正在学习Mybatis-Spring的使用方法,今 ...
- SpringBoot:Consider defining a bean of type 'com.wzw.blog.mapper.UserMapper' in your configuration.
今天使用SpringBoot整合Mybatis时遇到一个错误. *************************** APPLICATION FAILED TO START ************ ...
最新文章
- Unity协程截图,WWWForm、WWW配合上传
- 大学生计算机基础excel视频,大学生计算机基础Excel.doc
- python绘制直方图根据不同分类_如何在python中绘制具有多个类别的直方图
- Ubuntu mysql数据库导入sql文件
- 高通、猎户机型Android典型bootloader分析
- python抓取网站URL小工具
- 【转】03.Dicom 学习笔记-DICOM C-Get 消息服务
- Ubuntu 14.04 安装 WPS
- python 将二维数组旋转_python 二维数组90°旋转
- Activity 关于生命周期一些问题的实践验证
- kettle将文件路径定义为_Kettle变量和自己定义java代码的实例应用
- win10浏览器闪退_Win10专业版下Edge浏览器闪退的多种解决技巧
- C语言全局变量和局部变量的区别详解
- 身份证,邮箱等的验证
- chrome regedit 崩溃_谷歌浏览器网页崩溃的解决方法
- 减法公式运算法则_小学所有的运算定律和什么叫加法什么叫减法,乘法a+b=c什么的公式也要...
- TFT和STN液晶区别
- php聊天室禁言时间开发,聊天室技术(五) -- 指挥中心_PHP
- 解决微信小程序数据渲染缓慢或卡顿的方法
- 怎么更改锁定计算机背景图片,电脑锁屏背景图片如何更改