FAQ(9):org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.UserMapper is not kn
来源:互联网 发布:河南移动数据运营中心 编辑:程序博客网 时间:2024/06/04 17:43
Mybatis框架实战faq。
Log如下:
org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.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:717)at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:292)at com.smbms.entities.UserTest.test01(UserTest.java:31)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
解决:(1)把mapper.xml文件放置到跟接口DAO.java同一个文件;
(2) 同时配置config.xml:
<mappers> <mapper resource="com.smbms.dao.UserMapper.xml"/> <mapper resource="com.smbms.dao.ProviderMapper.xml"/> </mappers>
阅读全文
0 0
- FAQ(9):org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.UserMapper is not kn
- org.apache.ibatis.binding.BindingException: Type interface dxm.com.mapper.UserMapper is not known to
- FAQ(10):Type interface com.smbms.dao.UserMapper is not known to the MapperRegistry.
- 解决org.apache.ibatis.binding.BindingException: Type interface xxx is not known to the MapperRegistry
- ache.ibatis.binding.BindingException: Type interface dynamicDao.dao.UserDao is not known to the Mapp
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yj.dao.TrailerA
- org.apache.ibatis.binding.BindingException: Mapper method 'com.zbiti.alarm.dao.AlarmDao.queryTest at
- Exception in thread "main" org.apache.ibatis.binding.BindingException: Mapper method 'com.demo.DAO.B
- org.apache.ibatis.binding.BindingException: Mapper method 'com... has an unsupported return type
- org.apache.ibatis.binding.BindingException
- org.apache.ibatis.binding.BindingException
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.png.mapper.User
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.superr.powerful
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zzq.springboot.
- FAQ(14):Type interface com.test.dianzi.dao.spare_partsDao is not known to the MapperRegistry.
- mybatis报错nested exception is org.apache.ibatis.binding.BindingException: Parameter 'idList' not foun
- nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- nested exception is org.apache.ibatis.binding.BindingException: Parameter '__frch_item_0' not found
- Linux PM QoS framework(3)_per-device PM QoS
- 解决ionic请求数据跨域问题
- XListView上拉刷新,下拉加载
- Java程序员:工作还是游戏,是该好好衡量一下了
- 第一次使用树莓派会用到的操作(修改国内源,中文输入法,键盘布局,时区,挂载移动硬盘等)
- FAQ(9):org.apache.ibatis.binding.BindingException: Type interface com.smbms.dao.UserMapper is not kn
- Linux PM QoS framework(2)_PM QoS class
- ABAP:SmartForms--设计
- 计算机网络拓扑结构类型
- kotlin的基础语法
- 微服务构建:Spring Boot
- MyBatis完全使用指南
- Linux cpuidle framework(4)_menu governor
- 搭建Easy UI开发环境