Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
来源:互联网 发布:mac网络修复 编辑:程序博客网 时间:2024/06/11 23:41
最近在做一个项目用到了spring+springMVC+mybatis+maven 的项目。这个算是大学以来做的第三个项目,不过第一次接触到maven构建。遇到了一个问题,说实话自己被这个问题困住了好久。网上查了好久,也没有找到。好了,贴一下错误。
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.bigHero.doris.mapper.UserOperationMapper.user_register_check at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:178) ~[mybatis-3.2.1.jar:3.2.1] at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:38) ~[mybatis-3.2.1.jar:3.2.1] at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49) ~[mybatis-3.2.1.jar:3.2.1] at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42) ~[mybatis-3.2.1.jar:3.2.1] at com.sun.proxy.$Proxy14.user_register_check(Unknown Source) ~[na:na]
说明:
上面这个错误,解释的也很明显,这不就是mapper和dao映射不上么。
确实,这个方向没有错。正常,我会检查,mapper
的namespace
、 dao,mapper
的方法名 等等这些 看看是不是这些细微的小问题。。
然后就是大量时间的花费,最后发现没毛病!!! crazy? excuse me??
好了,不逗了,最后检查一下maven的输出目录吧!也许根本就没有mapper文件,像这样>>
这就是问题,maven根本没有把mapper输出,所以pom.xml
加入如下
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources>
ok,运行,问题解决
0 0
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 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):
- MyBatis + maven org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 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):
- 自己动手封装VxWorks下C++基础库
- rails中如何在a标签中添加其他标签
- (七)ExtJs之表单[Ext.form.FormPanel]的使用
- postgresql 数据库的启动与 关闭
- IAR之目标文件内存分配
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Android之自定义控件入门
- 无线监听工装使用说明
- 并查集
- java语言程序设计第十版(Introduce to java 10th) 课后习题 chapter7-30
- 特征选择之卡方统计 Chi-Square
- JNI问题
- 一、初学SpringMVC+Mybatis之Spring简介
- LaTeX数学公式