mybatis maven打包出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
2017-06-26 00:00
1511 查看
使用maven,mybatis开发项目的时候,在eclipse中调试一切正常,当使用maven打出的包上传到Linux服务器上运行之后,会出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)。
检查maven配置,配置也是正确的。pom.xml也添加过如下配置
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resource</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
解压包之后,发现mapper.xml都在里面,还是会报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)。错误;
经过各种尝试,最后修改mapper.xml
由原来的得
<mappers>
<package name="com.server.canceluser.mapper" />
</mappers>
修改为
<mappers>
<mapper resource="com/server/canceluser/mapper/canceluserMapper.xml" />
<mapper resource="com/server/canceluser/mapper/queryInfoMapper.xml" />
<mapper resource="com/server/canceluser/mapper/snapshotMapper.xml" />
</mappers>
在出包测试,问题修复掉了!
检查maven配置,配置也是正确的。pom.xml也添加过如下配置
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resource</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
解压包之后,发现mapper.xml都在里面,还是会报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)。错误;
经过各种尝试,最后修改mapper.xml
由原来的得
<mappers>
<package name="com.server.canceluser.mapper" />
</mappers>
修改为
<mappers>
<mapper resource="com/server/canceluser/mapper/canceluserMapper.xml" />
<mapper resource="com/server/canceluser/mapper/queryInfoMapper.xml" />
<mapper resource="com/server/canceluser/mapper/snapshotMapper.xml" />
</mappers>
在出包测试,问题修复掉了!
相关文章推荐
- IDEA的maven项目出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误解决方法
- maven打包项目后org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis绑定错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题。
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 当mybatis整合spring后出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题。
- mybatis整合springmvc时的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found
- mybatis错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 关于mybatis “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 错误的问题
- mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 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典型的错误org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- mybatis出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- ssm整合出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
- maven项目中,遇到org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Mybatis笔记二:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 单元测试出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)