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 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.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:291)at com.kuang.dao.UserDaoTest.test(UserDaoTest.java:17)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)at org.junit.runners.ParentRunner.run(ParentRunner.java:363)at org.junit.runner.JUnitCore.run(JUnitCore.java:137)at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
错误原因:
UserDao没有在mybatis配置文件中注册
解决办法:
将你的mapper.xml在mybatis-config.xml中注册,即在mybatis-config.xml中添加如下配置:
<!--每一个”Mapper.XML都需要在Mybatis核心配置文件中注册! --><mappers><mapper resource="com/kuang/dao/UserMapper.xml"/></mappers>
org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDao is not known to the相关推荐
- 解决Mybatis报错问题:org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDao is
解决方案分为两种情况: 1.在mybatis核心配置文件中(mybatis-config.xml)配置mappers <!--每一个Mapper.xml文件都需要在mybatis核心配置文件中注 ...
- Mybatis报错org.apache.ibatis.binding.BindingException: Type interface com.trf.dao.UserDao is not known
报错log:org.apache.ibatis.binding.BindingException: Type interface com.trf.dao.UserDao is not known to ...
- org.apache.ibatis.binding.BindingException:Type interface com.itcase.dao.UserDao is not knownto the
报错信息: org.apache.ibatis.binding.BindingException: Type interface com.itcase.dao.UserDao is not known ...
- MyBatis报错:org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.provider.Provider
在Java使用MyBatis框架开发时,遇到报错:org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.pr ...
- org.apache.ibatis.binding.BindingException: Type interface xxx.Mapper is not known to the MapperRegi
一.错误描述 今天心血来潮回顾了一下mybatis项目,发现如下错误: org.apache.ibatis.binding.BindingException: Type interface com.z ...
- 解决org.apache.ibatis.binding.BindingException: Type interface XXX is not known to the MapperRegistry
笔者在做mybatis的一个例子的时候,出现了下面这一个报错 org.apache.ibatis.binding.BindingException: Type interface com.myBati ...
- 解决org.apache.ibatis.binding.BindingException: Type interface *** is not known to the MapperRegistry.
解决org.apache.ibatis.binding.BindingException: Type interface com.mytest.dao.IUserDao is not known to ...
- 关于配置双数据源报错org.apache.ibatis.binding.BindingException: Type interface is not known to the MapperRegis
报错org.apache.ibatis.binding.BindingException: Type interface is not known to the MapperRegistry.,在网上 ...
- Exception in thread “main“ org.apache.ibatis.binding.BindingException: Type interface com.neusoft.Id
Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com. ...
最新文章
- nginx技术(2)nginx的配置详解
- 换一个角度再谈一下WF
- Autodesk布道GIS新理念
- SqlServer 执行计划及Sql查询优化初探
- Azure 中国篇之计算服务—多个站点的×××配置
- 基于android的简单网页_成都APP开发:APP原生和网页开发有什么区别?
- 204787 ,194787 |0001 1131 0001 4226 7035 ![2480 ]
- DHTML【9】--Javascript
- [C] static和extern的作用
- String 转 jsonObject
- 【WPS】excel 使用MD5宏 windows环境
- PC网站接入微信登陆流程一:微信开放平台账号注册和开发者资质认证
- AUTOCAD--动态缩放
- 从0开始的视频特效制作之路
- 用慧编程做计算机,慧编程人工智能应用, 比个手势就能做算术!
- 微信小程序导航栏怎么写
- STM32F103C8T6基于Arduino框架下利用定时器跑RBG灯闪烁
- cv2.boundingRect
- 深入浅出聊聊Java函数式编程思想
- 一家两制抗风雨 有得有失看未来(转)
热门文章
- 发送邮件程序报错454 Authentication failed以及POP3和SMTP简介
- MySQL 直接存储图片并在 html 页面中展示,点击下载
- 第5章 函数与函数式编程
- centos下安装pip时失败:
- System Center Technical Preview DPM(2016)对Exchange2016的灾难恢复
- Sql Server中自动序号的方法
- 中西方对时间的差异_中西方时间观念差异 英文
- Mysql windows 安装提示MSVCR120.dll文件丢失
- thrift介绍及应用(四)—hadoop的thrift接口
- php根据汉字首字母分组,利用PHP获取汉字首字母并且分组排序详解