Invalid bound statement (not found)
发布日期:2022-02-10 11:36:59 浏览次数:30 分类:技术文章

本文共 1486 字,大约阅读时间需要 4 分钟。

INFO FreeMarkerConfigurer:131 - ClassTemplateLoader for Spring macros added to FreeMarker configuration

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.project.dao.reportdao.ReportDao.findMemberCountByMonths

at org.apache.ibatis.binding.MapperMethod$SqlCommand.
(MapperMethod.java:225)at org.apache.ibatis.binding.MapperMethod.
(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.$Proxy12.findMemberCountByMonths(Unknown Source)at com.project.reportserviceimpltest.ReportDaoTest.testFindMemberCountByMonths(ReportDaoTest.java:19)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)...

可能错误原因:

  1. 包扫描扫描不到
  2. xml中的namespace不对
  3. 映射文件与其对应的接口在工程中的路径不对
  4. 映射文件与其对应的接口文件名不对应

转载地址:https://blog.csdn.net/drug1910951117/article/details/108002674 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:redis集合的差集 sdiff、交集 sinter、并集 sunion
下一篇:异常:This application has no explicit mapping for /error, so you are seeing this as a fallback.

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2024年04月02日 04时35分58秒