ibatis bindingexception invalid bound statement
来源:互联网 发布:js随机数1到10 编辑:程序博客网 时间:2024/06/06 19:42
最近在原来的maven项目中的dao子项目中加入Redis时,新加入的redisDAO在执行的时候出现了这个bug
ibatis bindingexception invalid bound statement
因为我是使用的注解注入的Service,所以突然爆出Mybatis的错误就有点不明白为什么。
其实一般的这个错误原因都是你的配置或者一些方法没有写对,因为你在使用Mybatis的时候声明的Interface都是由Mybatis注入,报这样的错误一定是namespace或者方法写错了,总之是配置的问题。
但是这次我很清楚这个DAO的实现是使用的自己implement的Java类,所以不应该报Mybatis的错误,因为虽然放在了dao子项目中,但是并没有使用Mybatis。
所以想到了可能是配置文件的问题,于是找到了这一行配置
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" p:basePackage="com.kevin.dao.mybatis" p:sqlSessionFactoryBeanName="sqlSessionFactory"/>
p:basePackage就是讲这个包下面的所有Interface都使用Mybatis注入,所以将它改成适合的包就可以了,因为这个项目下之前都是Mybatis的代码,所以包路径就很短,所以RedisDAO就被Mybatis注入了,结果找不到合适的mapper~~
0 0
- ibatis bindingexception invalid bound statement
- 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)
- 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)
- PHP发送邮件
- android判断是否后台运行
- 说明
- python 排序
- 贪心算法:最优装载问题(java版本)
- ibatis bindingexception invalid bound statement
- 最大子列和的四种算法比较
- day07
- Android代码连接Wifi时被系统切换到其他Wifi的问题
- Dojo1.11官方教程文档翻译(3.2)使用dojo/query
- Android插件化开发之用DexClassLoader加载未安装的APK资源文件来实现app切换背景皮肤
- JSP AJAX之Form序列化登录体验
- homerHEVC代码阅读(30)——帧间预测的主函数
- c++primer第三章练习题遇见的问题总结