1 Invalid bound statement

1 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.e3mall.search.mapper.ItemMapper.getItemList

事故现场

事故原因

接口和实现类不在同一个目录下面,找不到映射文件导致的。

此异常的原因是由于 mapper 接口编译后在同一个目录下没有找到 mapper 映射文件而出现的。由于 maven 工程在默
认情况下 src/main/java 目录下的 mapper 映射文件是不发布到 target 目录下的。

事故解决

在 e3-search-service工程的 pom 文件中添加如下内容

告知在src/main/java和src/main/resources下面都有配置文件。

<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>

MyBatis异常总结的更多相关文章

  1. mybatis异常:Improper inline parameter map format. Should be: #{propName,attr1=val1,attr2=val2}问题分析及解决

    转载自:http://blog.csdn.net/jackpk/article/details/44158701 mybatis异常:Improper inline parameter map for ...

  2. mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long'

    mybatis 异常 There is no getter for property named 'bizId' in 'class java.lang.Long' 当使用mybatis进行传参的时候 ...

  3. mybatis异常invalid comparison: java.util.Date and java.lang.String

    原文链接:http://blog.csdn.net/wanghailong_qd/article/details/50673144 mybatis异常invalid comparison: java. ...

  4. mybatis异常:Could not find result map Java.util.Map 问题分析及解决 定位不到具体的位置的错误

    mybatis异常:Could not find result map Java.util.Map 问题分析及解决 报这个错误呢,很难受的就是你定位不到具体的地方,找不到位置修改,你只知道有错误,但是 ...

  5. Mybatis异常:java.lang.NumberFormatException: For input string: "S"

    MyBatis异常日志如下: Caused by: java.lang.NumberFormatException: For input string: "S" at sun.mi ...

  6. Mybatis异常_02_Result Maps collection already contains value for

    一.异常 1.异常信息 2.异常原因 XXXMapper.xml文件中存在重名对象,保持名称不要一样即可正常启动. 我的原因是namespace与其他mapper 一样. 3.可能的原因 (1)nam ...

  7. mybatis异常集锦

    [Mybatis]报错:Malformed OGNL expression: name!= null and name != ' ' [Mybatis]报错:Malformed OGNL expres ...

  8. mybatis异常:nested exception is org.apache.ibatis.builder.BuilderException: Error resolving JdbcType

    异常详细 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.Builde ...

  9. MyBatis 异常 集锦

    异常1.使用映射器 (还没有使用Spring) 异常信息摘要: org.apache.ibatis.binding.BindingException: Type interface com.jege. ...

  10. Mybatis异常There is no getter for property named 'XXX' in 'class com.xxx.xxx.UserAccountDTO

    mybatis报错异常信息如下: 解决: 在接口中加上注解:@Param("userAccountDTO"),如图

随机推荐

  1. ZOJ 3702 Gibonacci number 2017-04-06 23:28 28人阅读 评论(0) 收藏

    Gibonacci number Time Limit: 2 Seconds      Memory Limit: 65536 KB In mathematical terms, the normal ...

  2. C#基础入门 七

    C#基础入门 七 接口 由于C#语言不支持多重继承,所以可以使用接口模拟结构的继承,通过使用interface关键字,定义一个接口. interface USB { void Read(string[ ...

  3. Debug就是Debug,Release就是Release

    现在线上发布的时候使用的是增量发布,什么是增量发布呢,就是变化什么,上什么.最近把jenkins搭建上去了,发现每次dll文件大小不一样,已查询发现原来是两个模式debuge模式与release模式搞 ...

  4. centos 中 mongodb 启动失败的修复

    mongodb是使用centos的yum命令安装的,整个的安装过程如下: 1. 运行 yum info mongo-10gen查看是否有mongodb源,如有跳至第3步. 2. 运行 vim /etc ...

  5. UWP开发入门(二)——RelativePanel

    RelativePanel也是Win10 UWP新增的控件,和上篇提到的SplitView一样在UWP的UI布局起到非常重要的作用.说句实在话,这货其实就是为了UWP的Adaptive UI而特意增加 ...

  6. infopath 2007 升级到2013 栏目字段重复生成问题

    1. 把Expense Statement.xsn的xsn扩展名改成zip.然后解压后会看到有一个mnifest.xsf. 2. 在vs 2013 中打开它. 3. Search for the fi ...

  7. 「BZOJ1426」收集邮票

    题目链接 戳我 \(Solution\) 我们首先转换一下问题: 假设我们进行了k轮得到了所有种类的邮票 则所花费用为: \[(1+2+5+...+k)=\frac{(1+k)*k}{2}=\frac ...

  8. java学习笔记—Servlet技术(11)

    如果大家要开发一个动态的网站,那么就必须要学习一种动态的网页开发技术.那么在SUN提供的JavaEE中主要包含两种开发动态网页的技术:Servlet和JSP技术. Servlet技术简介 Servle ...

  9. 水平居中和transform: translateY(-50%) 实现元素垂直居中效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. pymongo 学习

    查看一条记录,返回一条 dict 记录 db.Account.find_one({"UserName":"keyword"}) 查看某一列的一条记录(此时的1, ...