为了账号安全,请及时绑定邮箱和手机立即绑定

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.seckill.dao.SeckillDao.queryById

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.seckill.dao.SeckillDao.queryById

 at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:196)
 at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:44)
 at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)
 at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
 at com.sun.proxy.$Proxy16.queryById(Unknown Source)
 at com.seckill.dao.SeckillDaoTest.queryById(SeckillDaoTest.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: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.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73)
 at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
 at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224)
 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
 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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
 at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
 at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
 at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
 at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)


正在回答

4 回答

应该是没配置好吧  这个错误就是找不到mapper.xml sql配置文件的原因 多看几遍配置的视频应该就能搞定的

0 回复 有任何疑惑可以回复我~

查看配置中是否配置了自动扫描xml包

<property name="mapperLocations" value="classpath:mapper/*.xml"></property>


0 回复 有任何疑惑可以回复我~
#1

zzephyr 提问者

直接是classpath:*.xml 这样可以的吗
2017-03-16 回复 有任何疑惑可以回复我~

http://img1.sycdn.imooc.com//58c914310001cd0210190354.jpg

一致的

0 回复 有任何疑惑可以回复我~
#1

静月

有解决吗?我也遇到这个问题
2017-06-14 回复 有任何疑惑可以回复我~

Dao的xml文件没有找到,看下xml文件名和Dao的文件名是否一致

0 回复 有任何疑惑可以回复我~
#1

zzephyr 提问者

http://img1.sycdn.imooc.com//58c914310001cd0205000174.jpg 一致的
2017-03-15 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.seckill.dao.SeckillDao.queryById

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信