not known to the MapperRegistry
来源:互联网 发布:xampp配置mysql 编辑:程序博客网 时间:2024/06/07 07:42
org.apache.ibatis.binding.BindingException: Type interface com.hl.mybatis.first.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:732) at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:292) at com.hl.mybatis.first.test.UserMapperTest.testfindUserByID(UserMapperTest.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
解决方法:
在主配置文件中配置mapper.xml
<mappers> <mapper resource="mapper/usermapper.xml"/></mappers>
阅读全文
0 0
- not known to the MapperRegistry
- mapper is not known to the MapperRegistry
- Mybatis注解学习--xxxMapper is not known to the MapperRegistry
- Type interface XXXMapper is not known to the MapperRegistry 解决办法
- Type interface is not known to the MapperRegistry.的解决办法
- Type interface "xxxxxxxx" is not known to the MapperRegistry
- Type interface mapper.XxxMapper is not known to the MapperRegistry.
- Type interface mapper.UserMapper is not known to the MapperRegistry.
- Type interface XXXMapper is not known to the MapperRegistry.的解决办法。
- mybatis异常:Type inferface XXXX is not known to the MapperRegistry
- Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry. 解决方法
- Type interface com.hk.ssm.mapper.StudentMapper is not known to the MapperRegistry.
- mybatis报错Type interface xxx.Dao is not known to the MapperRegistry
- Type interface com.binarysoft.service.region.RegionDAO is not known to the MapperRegistry.
- Type interface com.mybatis.mapper.StudentMapper is not known to the MapperRegistry
- Mybatis出现Type interface XXXMapper is not known to the MapperRegistry.的解决办法。
- 解决org.apache.ibatis.binding.BindingException: Type interface xxx is not known to the MapperRegistry
- Type interface cn.itsun.dao.UserDao is not known to the MapperRegistry.
- 逃离or逃避:过年后,你还回不回大城市?
- 数据库更新迭代
- 搭建CAS单点登录服务器
- Spring MVC ModelAndView使用时所犯的一个小错误
- 使用CSS的flex的感悟
- not known to the MapperRegistry
- [Web]javascript正则表达式语法
- TF实现物体识别、行人检测和图像
- JavaScript 扩展方法
- 霍金:人工智能不一定是好事,或导致人类灭亡【智库2861】
- Android PopupWindow的使用和分析
- 苏宁携手S8南京“搞事情”,背后透露出怎样的信号?
- 说说 JavaScript 在 DOM 2、3 级标准中定义的样式规则(属性和方法)
- ES6语法(4)