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 ...
随机推荐
- 阿里P8Java大牛仅用46张图让你弄懂JVM的体系结构与GC调优。
本PPT从JVM体系结构概述.GC算法.Hotspot内存管理.Hotspot垃圾回收器.调优和监控工具六大方面进行讲述.图文并茂不生枯燥. 此PPT长达46页,全部展示篇幅过长,本文优先分享前十六页 ...
- python3学习-logging模块
1.logging模块的使用非常简单,引入模块就可以使用. import logging logging.debug('This is debug message') logging.info('Th ...
- Mysql-巧用join来优化sql
0. 准备相关表来进行接下来的测试 相关建表语句请看:https://github.com/YangBaohust/my_sql user1表,取经组 +----+-----------+------ ...
- cs224d---词向量表示
1 Word meaning 1. 1 word meaning的两种定义 Definition meaning:单词的含义指代了客观存在的具体事物,如眼镜. Distributional simil ...
- linux后台运行的几种方式
1.nohup将程序以忽略挂起信号的方式运行起来 补充说明nohup命令 可以将程序以忽略挂起信号的方式运行起来,被运行的程序的输出信息将不会显示到终端.无论是否将 nohup 命令的输出重定向到终端 ...
- 本地VSCode编辑远程服务器文件
前言 先说下我的场景:服务器搭设了一系列复杂环境,然后需要使用PHP实现某些功能 选这种远程编辑的原因: 首先PHP打死我也不想装(这个现在是出了VB外最惹人厌的语言了) 然后环境比较复杂,本地装下比 ...
- Zabbix4.0安装浅谈
一.此篇文章存在意义 针对超级小白,大神绕过 在zabbix官网https://www.zabbix.com/download里,需要数据库,但是并没有指导小白的我们如何安装数据库,此文章包含了Mys ...
- LoRaWAN_stack移植笔记 (二)_GPIO
stm32相关的配置 由于例程使用的主控芯片为STM32L151C8T6,而在本设计中使用的主控芯片为STM32L051C8T6,内核不一样,并且Cube库相关的函数接口及配置也会有不同,所以芯片的驱 ...
- static用法总结:
这是我的第一篇随笔! 1.当1.cpp和2.cpp都定义了同一个全局时链接会报错,变量名冲突.需要将其中一个设置为static控制其作用域为只在一个源文件内部. 2.函数名也是全局的,故static的 ...
- C#_HttpWebRequest保存cookies模拟登录的方法
CookieContainer cookies = new CookieContainer(); string url = "http://www.google.com.hk/"; ...