MyBatis + maven org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
来源:互联网 发布:淘宝水晶店哪家是真的 编辑:程序博客网 时间:2024/06/06 04:49
报错 MyBatis + maven +idea 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
异常信息如下:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.tzq.batis.mapper.UserMapper.queryUserByIdat org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:214)at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)at com.sun.proxy.$Proxy9.queryUserById(Unknown Source)at com.tzq.batis.junit.TestUser.testQueryUserById(TestUser.java:23)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:68)at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
今天在进行Mybatis + Spring 整合,运行通过id查询数据时报的错误, 配置文件等没有问题报的这个错误 ,开始还比较郁闷,仔细想了一下这个是 maven项目 mapper的配置文件应该放在对应mapper接口的 resource 同包下 ,编译是会自动放到一起, 如果直接在项目中就放到一起,就会报上面的错误。
代码结构报错前结果:
解决后代码结构:
阅读全文
0 0
- SSMF maven项目 mybatis报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- maven 项目,mybatis报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- MyBatis + maven org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Thinkphp 模型->区间查询
- Test...
- 抽象类和接口
- 测试啊
- 读写文件时00 0A与80 0A的bug
- MyBatis + maven org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- CSS 的优先级机制[总结]
- 判断三点顺序(顺时针或者逆时针)(模板)
- poj3461——Oulipo(kmp)
- Spring Scheduled + Redis 实现分布式定时器(一)
- 自定义View系列目录索引
- Redis应用场景
- [拓扑序] Educational Codeforces Round 25 825E. Minimal Labels
- Java中serialVersionUID的作用