Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
来源:互联网 发布:闪电下单软件 编辑:程序博客网 时间:2024/06/05 15:22
最近在做一个项目用到了spring+springMVC+mybatis+maven 的项目。第一次接触到maven构建和使用idea。遇到了一个问题,说实话自己被这个问题困住了好久。网上查了好久,也没有找到。好了,贴一下错误。
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文件,像这样>>
项目和mapper有关的部分
输出目录 :
这就是问题,maven根本没有把mapper输出,所以pom.xml 加入如下
<build> <plugins> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.7</version> <configuration> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>8888</port> <maxIdleTime>30000</maxIdleTime> </connector> </connectors> <webAppSourceDirectory>${project.build.directory}/${pom.artifactId}-${pom.version}</webAppSourceDirectory> <contextPath>/</contextPath> </configuration> </plugin> </plugins> <!-- 添加资源标签 --> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </build>
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):
- 应用expect登陆服务器
- AndroidStudio 放弃Gradle使用Android.mk
- 自学java之hibernate安装及配置
- Unix学习(一)
- 优先队列(下次总结完整)
- Maven 遇到mybatis 发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- Maven创建项目: Failed to execute goal org.apache.maven.plugin( mvn archetype:create)
- leetcode_208 Implement Trie(Prefix Tree)
- hello world
- JAVA中的继承
- qt4与qt5不兼容问题
- 剑指offer 合并两个数组 java实现
- c++实验二
- IOS开发探索(一):CocoalPods相关