Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample问题解决
最近在做一个关于ssm框架整合的项目,但是今天正合完后出现了问题:
Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample
表示找不到mapper映射文件(xml)


解决办法:
方法一、在mapper工程下的pom文件中加入下面的内容,让mapper映射文件加载到target的classes中去
|
<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build> 如果pom文件中已经有build标签,只是把resources标签内部的内容拷贝进去,而build标签就不用了 若是没有就全部加进去 |
方法二、如果还是没有解决,问题可能出现在扫描mapper.xml文件的配置上:
不妨试着修改如下:
修改前:

修改后:

Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample问题解决的更多相关文章
- [转载]Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误
因碰到同样的问题,使用该方法对我有效,为方便以后查找,所以做了转载,原文请查看:https://www.cnblogs.com/fifiyong/p/5795365.html 在Maven工程下,想通 ...
- Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误
在Maven工程下,想通过controller接收url中的参数Id查询数据库的数据,并且以json形式显示在页面. 在浏览器输入url后出现的问题: 八月 22, 2016 1:45:22 下午 o ...
- Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey
Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey Invalid bound ...
- Invalid bound statement(not found):cn.e3mall.mapper.TbItemMapper.selectByExample.....
1.出现如下问题: 说明mapper接口和mapper.xml映射文件没有在一个文件夹下面 2.解决方法: 在dao层的pom.xml中配置一下: <!-- 如果不添加此节点mybatis的ma ...
- 项目启动报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wuhongyu.mapper.OrdersMapper.selectByExample
在用maven配置mybatis环境时出现此BindingExceptiony异常,发现在classes文件下没有mapper配置文件,应该是maven项目没有扫描到mapper包下的xml文件, 在 ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shen.mapper.UserMapper.findById
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shen.mapper.Use ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.bw.mapper.BillMapper.getBillList at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:225
这个错误是没有找到映射文件 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.b ...
- IDEA+Maven+Mybatis 巨坑:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.UserMapper.findAll
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.User ...
- Invalid bound statement (not found): com.zheng.mapper.UserMapper.login
错误的原因:mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到. mapper接口开发规范 1.Mapper.xm ...
随机推荐
- Vue系列:.sync 修饰符的作用及使用范例
作用:对传递给子组件的 prop 数据进行“双向绑定”.(正常情况下,prop 的数据都是单向数据流) 代码参考如下: 父组件部分 子组件部分
- 从Maven私服获取依赖
通过Internet直接从Maven公用仓库获取依赖包是默认配置.不过对于中国软件公司来讲,访问这些公用仓库通常较慢,对于一些管理严格的不能直接上网的软件公司来讲,这更加是不可能的.Maven项目可以 ...
- Elasticsearch由浅入深(一)
什么是Elasticsearch 什么是搜索 百度:我们比如说想找寻任何的信息的时候,就会上百度去搜索一下,比如说找一部自己喜欢的电影,或者说找一本喜欢的书,或者找一条感兴趣的新闻(提到搜索的第一印象 ...
- RecyclerView实现混合布局
PS:好长时间不写博客了,起初是不知道写些什么,后来接触了到了很多东西,原本看似简单的东西,背后都隐藏着巨大的秘密,想handler的使用,一般情况下会引起内存泄漏问题,想着找到方法结局不就得了吗,可 ...
- js页面reload问题
form表单提交时,action="url" method="get/post" 当ajax提交表单时,原本的ajax post提交 success后 不能 ...
- 使用docker快速搭建本地环境
在平时的开发中工作中,环境的搭建其实一直都是一个很麻烦的事情 特别是现在,系统越来越复杂,所需要连接的一些中间件也越来越多. 然而要顺利的安装好这些中间件也是一个比较费时费力的工作. 俗话说" ...
- 虚拟机中安装Oracle 12c
1.从本地电脑中拉oracle到Linux 2.安装Linux中的oracle 12C 拉oracle到Linux 1.点击"编辑虚拟机设置" 2.点击"硬盘" ...
- awrcrt更新到2.1(重大更新)
awrcrt更新到了2.1 awrcrt迎来了最近一年的最大一次更新,从2.03直接跳跃了2.1版本.本次更新,给awrcrt带了全面的改变. 最主要的更新内容是什么呢?请看 更新了图表javascr ...
- 在C和C++中struct与typedef struct的区别详细介绍
c中测试code struct Cmstruct { int c; } Cm; // Cm是一个变量 typedef struct MyStruct //这里的 Mystruct 可以省略 { int ...
- Delphi - 通过WinAPI WinExec直接调用系统工具
看如下代码: WinExec('mspaint.exe', SW_SHOWNORMAL); // SW_SHOWNORMAL = 1 系统画图 WinExec('write.exe', SW_SHOW ...