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 ...
随机推荐
- leetcode318
public class Solution { public int MaxProduct(string[] words) { ) { ; } int len = words.Length; int[ ...
- 视频x264编码浅析
声明 x264_param_t 结构体变量: x264_param_t params; x264_param_default_preset(¶ms, "ultrafast&q ...
- spark编译安装 spark 2.1.0 hadoop2.6.0-cdh5.7.0
1.准备: centos 6.5 jdk 1.7 Java SE安装包下载地址:http://www.oracle.com/technetwork/java/javase/downloads/java ...
- 【282】◀▶ arcpy.mapping 常用函数说明
arcpy.mapping 教程入门 arcpy.mapping 指导原则 按字母顺序排序的 arcpy.mpping 类列表 按字母顺序排序的 arcpy.mpping 函数列表 按字母顺序排序的 ...
- java定时任务调度工具Timer与Quartz的区别
Timer与Quartz的区别有三点: 1.出身不同:Timer由jdk直接提供,调用方式简单粗暴,不需要其它jar包支持.Quartz并非jdk自带,需要引入相应的jar包 2.能力区别:主要体现在 ...
- java基础之集合:List Set Map的概述以及使用场景
本文的整体思路以及部分文字来源:来源一 和 来源二 Java集合类的基本概念: 首先大家要明白集合为什么会出现: 在编程中,常常需要集中存放多个数据.从传统意义上讲,数组是我们的一个很好的选择,前提是 ...
- 【原创】13. MYSQL++之SSQLS(基本用法篇)
1. 综述 终于来到了SSQLS( Specialized SQL Structure),照我看来这是一个很类似于Hibernate的功能.也就是说,通过SSQLS可以将一张表完全对应到一个C++结构 ...
- 1-2 开发环境搭建-Windows平台
C:\Program Files\nodejs\node_modules\npm\npmrc C:\Users\ZHONGZHENHUA\.android\avd H:\heimaandroidadt ...
- Codeforces 919F——A Game With Numbers
转自大佬博客:https://www.cnblogs.com/NaVi-Awson/p/8405966.html; 题意 两个人 Van♂ 游戏,每人手上各有 8'>88 张牌,牌上数字均为 [ ...
- php 5.3 以上fpm安装
安装PHP #wget http://cn2.php.net/get/php-5.3.8.tar.gz/from/cn.php.net/mirror #tar -zxvf php-5.3.8.tar. ...