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. java中时间

    格式转化 SimpleDateFormat package day1211.common; import java.sql.Date;import java.sql.Timestamp;import ...

  2. How to Baskup and Restore a MySQL database

    If you're storing anything in MySQL databases that you do not want to lose, it is very important to ...

  3. Sourcetree拉取推送问题

    以下sourcetree使用时出现的问题:可以暂时用删除passwd文件解决 拉取时账号密码输入错误 已经有一个远程仓库了,但是需要拉取另一个远程仓库时,提示URL 进入 C:\Users\用户名\A ...

  4. Buffer Pool--SQL Server:Buffer Manager 对象

    --============================================================== --参考链接:http://technet.microsoft.com ...

  5. 自己从0开始学习Unity的笔记 VI (C#的for循环练习)

    最近学到了for循环,我觉得其实看情况吧,和while挺像的,不过适合于累加或者累减这类的,for循环要更好用一点 for循环首先格式是 ; i < length; i++) { } 意思很简单 ...

  6. FIM控制同步用户

     C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\UIShell 这个路径下,你如果懂FIM,可以进去看看 ...

  7. 【题解】 BZOJ4548 小奇的糖果

    本文同步在学弟ZCDHJ的个人博客发布,审核需要一段时间. 传送门 考虑题目中获得的糖果并不包含所有的颜色这句话,发现相当于我们可以直接选取某一个颜色强制不能选(这样子一定最优). 然后就可以考虑分开 ...

  8. iOS 设置 (plist)

    Architectures:

  9. C语言—第二次作业

    1.本章学习内容 1.1思维导图 1.2本章学习体会即代码量学习体会 1.2.1学习体会 在本章中对循环的内容进行了加深训练,学习了一种解决问题的方法循环嵌套,也学到了伪代码的运用,在描述算法是运用伪 ...

  10. ceph luminous 新功能之内置 dashboard

    # 开启 dashboard (在任一 mon_server 节点上)ceph mgr module enable dashboard # 设置dashboard 端口和IPceph config-k ...