org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

来源:6-5 店铺列表展示之Dao层的实现

weixin_慕沐8008385

2020-04-19

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.etc.o2o.dao.ShopDao.queryShopCount
at org.apache.ibatis.binding.MapperMethodSqlCommand.<init>(MapperMethod.java:230)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)atcom.sun.proxy.SqlCommand.<init>(MapperMethod.java:230) at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48) at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) at com.sun.proxy.SqlCommand.<init>(MapperMethod.java:230)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)atcom.sun.proxy.Proxy24.queryShopCount(Unknown Source)
at com.etc.o2o.dao.ShopDaoTest.testQueryShopListAndCount(ShopDaoTest.java:30)
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.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
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)

我想问一下这个错误怎么改呢,是我的pom文件中没有mybatis加载配置文件的配置么,还是什么问题。。。

写回答

1回答

翔仔

2020-04-20

Invalid bound statement (not found): com.etc.o2o.dao.ShopDao.queryShopCount

说的是同学的ShopDao.xml里面的queryShopCount方法的参数绑定有问题,需要和视频比对一下

0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程