在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: 错误的更多相关文章

  1. [转载]Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误

    因碰到同样的问题,使用该方法对我有效,为方便以后查找,所以做了转载,原文请查看:https://www.cnblogs.com/fifiyong/p/5795365.html 在Maven工程下,想通 ...

  2. Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample问题解决

    最近在做一个关于ssm框架整合的项目,但是今天正合完后出现了问题: Invalid bound statement (not found): com.taotao.mapper.TbItemMappe ...

  3. Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey

    Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey Invalid bound ...

  4. Invalid bound statement(not found):cn.e3mall.mapper.TbItemMapper.selectByExample.....

    1.出现如下问题: 说明mapper接口和mapper.xml映射文件没有在一个文件夹下面 2.解决方法: 在dao层的pom.xml中配置一下: <!-- 如果不添加此节点mybatis的ma ...

  5. 项目启动报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wuhongyu.mapper.OrdersMapper.selectByExample

    在用maven配置mybatis环境时出现此BindingExceptiony异常,发现在classes文件下没有mapper配置文件,应该是maven项目没有扫描到mapper包下的xml文件, 在 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. Invalid bound statement (not found): com.zheng.mapper.UserMapper.login

    错误的原因:mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到. mapper接口开发规范 1.Mapper.xm ...

随机推荐

  1. keil:C语言里面调用汇编程序

    C语言直观,汇编效率高,C里面嵌入汇编是很好的选择. 路径大概如图: mian.c是我的C语言程序,Func.s是汇编程序. 主要是Init_1这个函数的实现在汇编文件里面,使用汇编实现的. 首先在C ...

  2. 把jpg文件读取到内存char* 再转换成CImage

    网络上找到大神写的转换方法,不过就记下来,学习学习: 当然转成CImage之后就可以从CImage转换成HBITMAP 了 void DrawPic(CDC *pDC,char *buf,int le ...

  3. sftp put权限不够

    报错如下: sftp> put play.zip ./ Uploading play.zip to /opt/library/./play.zip remote open("/opt/ ...

  4. 游戏引擎架构Note2

    [游戏引擎架构Note2] 1.视觉属性(visual property)决定光线如何与物体表面产生交互作用. 2.一个Mesh所使用三角形的多少可以用细致程度(level-of-detail,LOD ...

  5. java Web jsp和servlet的关系

    JSP在本质上就是SERVLET,但是两者的创建方式不一样Servlet完全是JAVA程序代码构成,擅长于流程控制和事务处理,通过Servlet来生成动态网页很不直观JSP由HTML代码和JSP标签构 ...

  6. DataSet、DataTable转换List(泛型集合与DataSet互相转换 )

    using System.Data; using System.Reflection; using System.Collections; using System.Collections.Gener ...

  7. 【总结整理】关于GrowingIO、友盟、google analysis等数据分析

    作者:纯银V链接:https://www.jianshu.com/p/394ec6c96c98來源:简书简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处. 埋点主要分为四步:第一步是 ...

  8. c++ 门面模式(Facade)

    门面模式是比较常用的一种设计模式,我们可能在无意中就会使用,门面模式就是用一个门面类来处理子系统的复杂关系,门面类简单的Api接口供客户端调用.用一个简单的演播室来表示. #include <i ...

  9. Ajax——jQuery实现

    紧接上文 一.load()方法 load() 方法师jQuery中最为简单和常用的Ajax方法,能载入远程的HTML代码并插入到DOM中.它的机构是:load(url[,data][,callback ...

  10. Python 函数习题

    #encoding=utf-8 from urllib.request import urlopen import random import os ''' 1. 定义一个fuc(url, folde ...