在使用ssm时出现的错误:

org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for cn.itcast.ssm.mapper.CompetesMapperCustom.baseMap

原因是,在自己写的mapper.xml文件中具有相同id的不同select标签引用了同一个resultMap

例如:

<select id="selectCompetesForInit" parameterType="CompetesQueryVo" resultMap="baseMap">

     <include refid="baseSql"/>
   group by c.compete_id limit #{jumpCount},#{selectCount} </select>
<select id="selectCompetesForInit" parameterType="CompetesQueryVo" resultMap="baseMap">
<include refid="baseSql"/>
<where>
<if test="competeTitle != null">
and compete_title like #{competeTitle}
</if>
</where>
group by c.compete_id limit #{jumpCount},#{selectCount}
</select>

以上两个select具有相同的id(select里面的内容请自动忽略),其实不应该存在相同id的select标签,因为我太懒了(懒就懒呗,还不仔细,emmmmmmm...),复制粘贴代码以后忘记修改id了,导致出现了这个错误!

Result Maps collection already contains value for cn.itcast.ssm.mapper.CompetesMapperCustom.baseMap的更多相关文章

  1. java.lang.IllegalArgumentException: Result Maps collection already contains value for com.zhmy.businessapi.mapper.CompanyMapper.BaseResultMap

    复制mybatis的mapper.xml文件修改后,忘记将xml中的mapper标签里的namespace更换成对应类了,修改完即可

  2. mybatis(错误一) 项目启动时报“Result Maps collection already contains value forxxx”的解决方案

    Result Maps collection already contains value for xyx.dsw.dao.mapper.admin.quotationwish.TempTestTab ...

  3. mybatis启动报错Result Maps collection already contains value forxxx

    ssm搭建过程中启动tomcat,报错: Cause: java.lang.IllegalArgumentException: Result Maps collection already conta ...

  4. java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.Integer

    今天做springmvc+mybatis+spring的项目的时候发现了一个异常.如下: org.apache.ibatis.builder.IncompleteElementException: C ...

  5. Result Maps collection already contains value for

    Result Maps collection already contains value for select s.id,s.branch_name from t_wx_shop s left jo ...

  6. mybatisGenerator 代码自动生成报错 Result Maps collection already contains value for BaseResultMap--转

    转自:http://blog.csdn.net/tan3739/article/details/7555665 Exception in thread "main" Java.la ...

  7. nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoSupport': ...

  8. mybatis Result Maps collection already contains value for com.ebways.dictionary.dao.impl.PtInfoDaoImpl.beanMap

    java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...

  9. MyBatis出错Result Maps collection does not contain value for java.lang.Integer

    Servlet.service() for servlet [SpringMVC] in context with path [/eyou] threw exception [Request proc ...

随机推荐

  1. 06丨MongoDB基本操作

    使用 insert 完成插入操作 操作格式: db.<集合>.insertOne(<JSON对象>) db.<集合>.insertMany([<JSON 1& ...

  2. java并发编程工具类JUC第一篇:BlockingQueue阻塞队列

    Java BlockingQueue接口java.util.concurrent.BlockingQueue表示一个可以存取元素,并且线程安全的队列.换句话说,当多线程同时从 JavaBlocking ...

  3. ffmpeg安装之linux编译安装

    转发自白狼栈:查看原文 关于ffmpeg的安装,有的人可能要折腾很久,甚至折腾一个礼拜,究其原因,基本都是编译安装惹的祸. 我们提供4种安装方式,最复杂的莫过于centos7上的编译安装. ffmpe ...

  4. 使用 Flux+Flagger+Istio+Kubernetes 实战 GitOps 云原生渐进式(金丝雀)交付

    在这篇指南中,你将获得使用 Kubernetes 和 Istio 使用 GitOps 进行渐进式交付(Progressive Delivery)的实际经验. 介绍 gitops-istio GitOp ...

  5. bat脚本总结

    1.修改密码 @echo off set /p b=请输入新密码: net user %username% %b% echo 密码修改成功 %b% 请牢记你的密码 pause 2.删除hosts文件并 ...

  6. nginx的请求处理

      nginx的请求处理¶ nginx使用一个多进程模型来对外提供服务,其中一个master进程,多个worker进程.master进程负责管理nginx本身和其他worker进程. 所有实际上的业务 ...

  7. Caffe实现概述

    Caffe实现概述 目录 一.caffe配置文件介绍 二.标准层的定义 三.网络微调技巧 四.Linux脚本使用及LMDB文件生成 五.带你设计一个Caffe网络,用于分类任务 一.caffe配置文件 ...

  8. 马斯克如何颠覆航天? 1/5385成本,c++和python编程!

    马斯克如何颠覆航天? 1/5385成本,c++和python编程! 5月31日,经历了重重困难,马斯克的SpaceX载人飞船成功发射,这是美国自2011年以来首次发射载人航天飞船,也是美国进入由商业主 ...

  9. leetcode:在 D 天内送达包裹的能力

    链接:https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days/ 我是按照这个思路来做的. 如果随便给一个船的运 ...

  10. 【NX二次开发】获取尺寸信息UF_DRF_ask_draft_aid_text_info

    获取尺寸信息UF_DRF_ask_draft_aid_text_info 例如获取下面这三个的尺寸信息. 图1 输出结果: 10 <T+0.1!-0.1> 图2 输出结果: 10 < ...