maven 项目,mybatis报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
来源:互联网 发布:深入解析windows系统 编辑:程序博客网 时间:2024/06/05 04:11
maven管理的spring项目在打包install启动后,mybatis报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): …
错误描述:
项目使用mybatis作为持久层,整体框架使用spring-boot搭建,启动正常,在查询数据库时,就会报错,经过检查mapper.xml文件等等,发现namespace,接口方法名等等都没有写错,又因为是打包后才会报错,在打包前作测试没有错误。断定是打包后出现问题检查结果:
检查target文件目录下的mapper.xml文件,竟然发现没有xml文件,定位错误(在使用maven进行模块开发时,用的mybaties,会将配置文件放到dao层,而dao层的类型是jar,在打jar包时只会打包java文件,会将一些mapper映射文件或者properties文件给过滤掉,部署的时候会报找不到mapper配置文件等错误)解决办法,在pom文件中添加如下配置解决
<build> <resources> <resource> <directory>src/main/resources/</directory> <filtering>false</filtering> <includes> <include>**/*.properties</include> <include>**/*.xml</include> <include>**/*.txt</include> <include>**/*.ico</include> </includes> </resource> <resource> <directory>src/main/java/</directory> <filtering>false</filtering> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build>
0 0
- 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的 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 报错。
- spring 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)
- spring+mybatis整合报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- maven请求报错: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 + maven org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- maven项目中,遇到org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 运行Maven项目:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 关于ssm框架整合报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- ssm报错之 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)
- Java集合的小抄 Java初学者必备
- SDUT OJ 1295 螺旋方阵
- HDU - 2612 bfs [kuangbin带你飞]专题一
- 软件生命周期(SDLC) ——第一季
- Python中while语句说明与简单使用实例
- maven 项目,mybatis报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- hive配置问题记录
- js字符串日期yyyy-MM-dd转化为date示例代码
- 我的读书历程及书单整理
- Spring基础知识汇总 Java开发必看
- 数值分解
- Spring源码解析之IoC容器系列的设计实现(IoC容器系列概况)
- local & export
- EM与PX的对应关系