MyBatis异常总结
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异常总结的更多相关文章
- 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 ...
- 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进行传参的时候 ...
- mybatis异常invalid comparison: java.util.Date and java.lang.String
原文链接:http://blog.csdn.net/wanghailong_qd/article/details/50673144 mybatis异常invalid comparison: java. ...
- mybatis异常:Could not find result map Java.util.Map 问题分析及解决 定位不到具体的位置的错误
mybatis异常:Could not find result map Java.util.Map 问题分析及解决 报这个错误呢,很难受的就是你定位不到具体的地方,找不到位置修改,你只知道有错误,但是 ...
- Mybatis异常:java.lang.NumberFormatException: For input string: "S"
MyBatis异常日志如下: Caused by: java.lang.NumberFormatException: For input string: "S" at sun.mi ...
- Mybatis异常_02_Result Maps collection already contains value for
一.异常 1.异常信息 2.异常原因 XXXMapper.xml文件中存在重名对象,保持名称不要一样即可正常启动. 我的原因是namespace与其他mapper 一样. 3.可能的原因 (1)nam ...
- mybatis异常集锦
[Mybatis]报错:Malformed OGNL expression: name!= null and name != ' ' [Mybatis]报错:Malformed OGNL expres ...
- mybatis异常:nested exception is org.apache.ibatis.builder.BuilderException: Error resolving JdbcType
异常详细 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.Builde ...
- MyBatis 异常 集锦
异常1.使用映射器 (还没有使用Spring) 异常信息摘要: org.apache.ibatis.binding.BindingException: Type interface com.jege. ...
- Mybatis异常There is no getter for property named 'XXX' in 'class com.xxx.xxx.UserAccountDTO
mybatis报错异常信息如下: 解决: 在接口中加上注解:@Param("userAccountDTO"),如图
随机推荐
- 关于:Warning: skipping non-radio button in group的处理方法整理
下面讲的是一个意思: The problem is that the next control in the tab order following the last radio button of ...
- mysql my.cnf优化
[mysqld] lower_case_table_names = 1sql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION skip_name_r ...
- Centos7 Minni 安装 执行ifconfig命令出现 -bash ifconfig command not found 的解决方法
1) have a root privilege shell or be on the sudo list. 2a) At a root shell prompt (#) yum install ne ...
- 网页方式访问 QQ 小说书架
iPad.平板电脑 http://bookshelf.html5.qq.com/page?t=pad#!/bookshelf/ iPhone.手机 http://bookshelf.html5.qq. ...
- python3环境的搭建
Python3 下载 Python3 最新源码,二进制文档,新闻资讯等可以在 Python 的官网查看到: Python 官网:https://www.python.org/ 你可以在以下链接中下载 ...
- html中常用的标签元素
<html></html> 创建一个HTML文档<head></head> 设置文档标题和其它在网页中不显示的信息<title></t ...
- Mysql修改字段类型
mysql 修改字段长度 alter table news modify column title varchar(130); alter table 表名 modify column 字段名 类型 ...
- 用MVC5+EF6+WebApi 做一个小功能(一)开场挖坑,在线答题系统
从哪开始说呢,这几年微软的技术一直在变,像是牟足了劲要累死所有的NET程序员,从WebForm到MVC到现在MPA.SPA .Razor单页,从net2.0一直走到现在.net4.6.2,后面还有一个 ...
- asp.net web 应用站点支持域账户登录
1.IIS站点应用程序池设置管道模式为classic模式,identity设置为管理员账户 2.站点验证设置,只打开windows验证,其他都关闭 3.应用程序配置web.config配置如下: &l ...
- 【ocp-12c】最新Oracle OCP-071考试题库(37题)
19.choose the best answer View the Exhibit and examine the structure of the PROMOTIONS table. Evalua ...