Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误
在Maven工程下,想通过controller接收url中的参数Id查询数据库的数据,并且以json形式显示在页面。
在浏览器输入url后出现的问题:
八月 22, 2016 1:45:22 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [taotao-manager] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)
at com.sun.proxy.$Proxy30.selectByExample(Unknown Source)
原因:找不到mapper的映射文件
解决办法:
<!-- 如果不添加此节点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>
以上节点的内容,添加的位置在Maven工程下的父工程里面pom.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问题解决
最近在做一个关于ssm框架整合的项目,但是今天正合完后出现了问题: Invalid bound statement (not found): com.taotao.mapper.TbItemMappe ...
- 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 ...
随机推荐
- Halcon学习之五:有关图像的定义域的函数
1.add_channels ( Regions, Image : GrayRegions : : ) 将Image图像的灰度值赋给区域Regions,得到GrayRegions. 2.change_ ...
- 关闭SublimeText自动更新
[关闭SublimeText自动更新] 1.找到Preferences -> Settings-User(设置用户) 2.在最后一个花括号结尾(“}”)前添加一句:”update_check&q ...
- HashMap和HashSet的相同点和不同点
Map集合,就是有一对属性值的集合,属性包含key,和value.关键字key是唯一不重复的.Map是一个有序的集合,所以查询起来速度很快.而HashSet就像是把HashMap中value去掉,说白 ...
- Composer安装(windows)
https://files.cnblogs.com/files/wlphp/Composer-Setup.zip 先下载这个安装包,一直下一步 然后设置composer全局中国景象 composer ...
- shell cut 用法
cut -f 提取第几列 -d 按指定的分隔符割列 cut -f 1 xxx.txt 提取第1列 cut -f 1,3 xxx.txt 提取第1,3列 cut -d ":&qu ...
- python if __name__ == '__main__' 作用
转载:https://stackoverflow.com/questions/419163/what-does-if-name-main-do When your script is run by p ...
- 1.scala基础语法总结
Scala基础语法总结:Scala 与 Java 的最大区别是:Scala 语句末尾的分号 ; 是可选的.如果一行里写多个语句那么分号是需要的 val s = "菜鸟教程"; pr ...
- 再谈JQuery插件$.extend(), $.fn和$.fn.extend()
在我的博客中,曾经写过一篇关于JQuery插件的文章 https://www.cnblogs.com/wphl-27/p/6903170.html 今天看一个项目的代码时,看到使用JQuery插件部 ...
- Open Message Queue 集群问题
nohup ./imqbrokerd -tty -name myBroker -port 7677 -javahome /opt/omae/jdk1.7.0_45 -cluster 192.168.2 ...
- AutoLayout自动布局之VFL语言代码实现(一个神奇的语言)
一.什么是VFL语言?为什么要VFL语言? VFL全称是Visual Format Language,翻译过来是“可视化格式语言” VFL是苹果公司为了简化Autolayout的编码而推出的抽象语言 ...