当前位置:网站首页>[problem solving] ibatis.binding BindingException: Type interface xxDao is not known to the MapperRegistry.
[problem solving] ibatis.binding BindingException: Type interface xxDao is not known to the MapperRegistry.
2022-07-25 12:46:00 【Songdanmin】
List of articles
Problem description :
org.apache.ibatis.binding.BindingException: Type interface com.kuang.dao.UserDao is not known to the MapperRegistry.
MapperRegistry I do not know! UserDao.
reason :
XXXDaoMapper.xml After writing it , Not in the mybaits-config.xml Register in profile mapper,
Not registered mapper, Written XXXDaoMapper.xml Can't achieve XXXDao, Because there is no binding between them ,
To put it bluntly ,XXXDaoMapper.xml Namely XXXDao.java Implementation class of interface in ,
Originally write implementation class , It's through xxxDaoImpl.java class implement dao Layer interface , To achieve binding , Now through namespace To implement the binding
terms of settlement :
mybaits-config.xml Add :
<mappers>
<mapper resource="com/kuang/dao/UserMapper.xml"></mapper>
</mappers>

journal :
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:732)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getMapper(DefaultSqlSession.java:292)
at com.kuang.dao.UserDaoTest.test(UserDaoTest.java:42)
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: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.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.junit.runner.JUnitCore.run(JUnitCore.java:160)
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)
边栏推荐
- 【AI4Code】《Contrastive Code Representation Learning》 (EMNLP 2021)
- 919. Complete binary tree inserter: simple BFS application problem
- R language uses wilcox The test function performs Wilcox signed rank test to obtain the confidence interval of the population median (the default output result includes the confidence interval of 95%
- 我想问DMS有没有定时备份某一个数据库的功能?
- Selenium uses -- XPath and analog input and analog click collaboration
- Lu MENGZHENG's "Fu of broken kiln"
- 2022 Henan Mengxin League game (3): Henan University I - Travel
- 【8】 Clever use of color finder
- 【AI4Code】《CoSQA: 20,000+ Web Queries for Code Search and Question Answering》 ACL 2021
- Create directories and subdirectories circularly
猜你喜欢

【Flutter -- 布局】层叠布局(Stack和Positioned)

2022.07.24(LC_6125_相等行列对)

Cmake learning notes (II) generation and use of Library
What does the software testing process include? What are the test methods?

艰辛的旅程

Use of hystrix

想要做好软件测试,可以先了解AST、SCA和渗透测试

【AI4Code】《CoSQA: 20,000+ Web Queries for Code Search and Question Answering》 ACL 2021

Clickhouse notes 03-- grafana accesses Clickhouse

【AI4Code】《Contrastive Code Representation Learning》 (EMNLP 2021)
随机推荐
I want to ask whether DMS has the function of regularly backing up a database?
《富兰克林自传》修身
交换机链路聚合详解【华为eNSP】
感动中国人物刘盛兰
基于JEECG制作一个通用的级联字典选择控件-DictCascadeUniversal
More accurate and efficient segmentation of organs-at-risk in radiotherapy with Convolutional Neural
MySQL implements inserting data from one table into another table
WPF project introduction 1 - Design and development of simple login page
cmake 学习使用笔记(二)库的生成与使用
2022.07.24(LC_6125_相等行列对)
Moving Chinese figure liushenglan
Selenium uses -- XPath and analog input and analog click collaboration
Detailed explanation of flex box
Does MySQL have flush privileges
【二】栅格数据显示拉伸色带(以DEM数据为例)
Maskgae: masked graph modeling meets graph autoencoders
【ROS进阶篇】第九讲 URDF的编程优化Xacro使用
Pytorch project practice - fashionmnist fashion classification
【10】 Scale bar addition and adjustment
【9】 Coordinate grid addition and adjustment