当前位置:网站首页>org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):...
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):...
2022-06-23 16:49:00 【reg183】
运行一个简单mybatis maven项目测试用例报错
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zzy.mapper.UserMapper.selectUser
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)
at org.apache.ibatis.binding.MapperProxy.lambda$cachedMapperMethod$0(MapperProxy.java:61)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:61)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:56)
at com.sun.proxy.$Proxy2.selectUser(Unknown Source)
at Mytest.test(Mytest.java:25)
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:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

尝试了各种网上的办法都不靠谱。最终我是这么解决
修改mybatis-config.xml
<mappers>
<mapper class="com.zzy.mapper.UserMapper"/>
</mappers>
改成这个
<mappers>
<mapper resource="com/zzy/mapper/Mapper.xml"/>
</mappers>
重新运行测试用例,通过
边栏推荐
- Add new members to the connector family! Scenario connector helps enterprises comprehensively improve the operational efficiency of business systems
- [mae]masked autoencoders mask self encoder
- MySQL - reasons for using repeatable read
- Which securities company is good for opening a mobile account? Is online account opening safe?
- Explanation of the principle and code implementation analysis of rainbow docking istio
- How important is 5g dual card dual access?
- 7、VLAN-Trunk
- Year end: the "time value" and business methodology of live broadcast E-commerce
- MySQL transaction and its characteristics and locking mechanism
- Digital intelligent supply chain collaboration solution for new energy industry
猜你喜欢

JSON - learning notes (message converter, etc.)

FPN characteristic pyramid network

论文阅读 (58):Research and Implementation of Global Path Planning for Unmanned Surface Vehicle Based...

Query the size of each table in the database

Wechat applet: time selector for the estimated arrival date of the hotel

Self supervised learning (SSL)

torch学习(一):环境配置

Ctfshow PHP features
![[30. concatenate substrings of all words]](/img/e7/453c8524a23fbb7501e85140547ce1.png)
[30. concatenate substrings of all words]

论文阅读 (53):Universal Adversarial Perturbations
随机推荐
Alien world, real presentation, how does the alien version of Pokemon go achieve?
What is the mobile account opening process? Is it safe to open an account online now?
Installation, configuration, désinstallation de MySQL
Baidu AI Cloud product upgrade Observatory in May
MySQL transaction and its characteristics and locking mechanism
Kerberoasting without SPN
[go] calling Alipay to scan code for payment in a sandbox environment
Similarities and differences between Chinese and American electronic signature SaaS
论文阅读 (57):2-hydr_Ensemble: Lysine 2-Hydroxyisobutyrylation Identification with Ensemble Method (任务)
How to quickly obtain and analyze the housing price in your city?
C # connection to database
Goframe framework: graceful closing process
Thymeleaf - learning notes
qYKVEtqdDg
Hapoxy-集群服务搭建
解答02:Smith圆为什么能“上感下容 左串右并”?
How to use R language to draw scatter diagram
7、VLAN-Trunk
一文入门智能开关的3种功能形态
解答03:Smith圆为什么能“上感下容 左串右并”?