问题描述:

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.mapper.UserMapper.getUserList. please check file [D:\idea 2015\springsecuritydemon\target\classes\mapper\UserMapper.xml] and file [D:\idea 2015\springsecuritydemon\target\classes\mapper\UserMapper.xml]

问题分析:

1、mapper中存在id重复的MyBatis标签,导致报错。

    <select id="getUserList" resultType="com.entity.User">SELECT username,passwordfrom users</select><select id="getUserList" resultType="com.entity.User">select username,passwordfrom users<if test="endTime!=null">createTime &lt;= #{endTime}</if></select>

解决办法:

去掉其中一个id同名的MyBatis标签即可。

MyBatis Mapped Statements collection already contains value for xx.please check file [x]相关推荐

  1. [Mybatis]Mapped Statements collection does not contain value for selectOne

    学习使用 Mybatis 时,碰到 Mapped Statements collection does not contain value for selectOne 异常. 代码如下: ``` pu ...

  2. Spring Boot + Mybatis——RowBoundsPlugin造成的[Mapped Statements collection already contains value]解决方案

    基本概念 RowBoundsPlugin:通过ResultSet的游标实现的分页查询插件,容易出现性能问题 <plugin type="org.mybatis.generator.pl ...

  3. mybatis报错:java.lang.IllegalArgumentException: Mapped Statements collection does not contain

    在做mybatis案例的时候发现了一个问题,报错如下: org.apache.ibatis.exceptions.PersistenceException: ### Error querying da ...

  4. 记录Mybatis报Mapped Statements collection already contains value for 的错误的原因

    在一次提供升级包让同事升级后,启动服务时出现Mybatis报Mapped Statements collection already contains value for 的错误,导致无法启动. 1. ...

  5. 解决Mybatis查询错误:Mapped Statements collection does not contain value for xxx

    前言 新手在使用mybatis注解开发的时候,往往容易出现各种错误. 上述提到的"Mapped Statements collection does not contain value fo ...

  6. Mybatis出现Mapped Statements collection does not contain value错误解决方法

    前言: 最近重新学习mybatis,用的工具是intelliJ idea ,写dao实现类的方法调用数据库时出现找mybatis对应的配置文件的方法.错误如下 Exception in thread ...

  7. mybatis xml文件 id冲突错误 findUserIDById is ambiguous in Mapped Statements collection

    Error querying database.  Cause: java.lang.IllegalArgumentException: findUserIDById is ambiguous in ...

  8. 解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp

    解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp ...

  9. Mapped Statements collection already contains value for

    Mybatis出现Mapped Statements collection already contains value for 错误原因: 1.mapper中存在id重复的值 2.mapper中的p ...

最新文章

  1. 深度学习的150多篇文章和10多个专栏推荐
  2. android 字体像素转换工具类_android工具类,转换大小写,保留小数点处理方法
  3. oracle和mysql的备份有几种方法_Oracle 数据库的备份与恢復都有哪几种方法?
  4. ACM MM 2021 北航鹏城实验室提出 SOD 新方法:互补三边解码器网络(CTDNet),兼顾高性能和高效率...
  5. 前端开发要注意的浏览器兼容性问题整理
  6. 【Coursera】Third Week(1)
  7. 明年5G智能手机大爆发!出货量惊人
  8. 使用uploadify上传大文件报 IO error #2038错误的解决方案
  9. tBERT部分代码(自学用)
  10. 关于redis HSCAN count参数不生效的问题
  11. <tx:annoation-driven/>, web.xml的Spring配置文件位置,Spring父子容器, Spring部分源代码分析,<mvc:annotation-driven/>
  12. 就叫2021年度总结吧
  13. android 11.0 去掉音量键电源键组合键的屏幕截图功能
  14. Python全栈开发实战学习14
  15. LOL手游登上去服务器维护,lol手游进不去怎么回事?无法登陆解决方法
  16. 三维空间无人机均匀分布——球体包围
  17. 北航计算机控制系统实验报告,北航计算机控制系统实验报告资料.doc
  18. Oracle Golden Gate
  19. 只需 2 张照片就能 2D 变 3D,这个 AI 能自己脑补蜡烛吹灭过程
  20. execjs安装及相关问题解决

热门文章

  1. POI设置word文档只可修订
  2. UI设计中的IOS14设计规范
  3. 一些server端知识合集
  4. 1 Day:部署工作环境
  5. Python基础-生成器与yield
  6. 11.18随堂测验:学习对象
  7. Node微信公众号开发 - 定时获取最新文章同步到MySQL数据库
  8. 方舟手游修改服务器难度,《方舟生存进化》手机版难度怎么选 方舟生存进化手机版难度选择攻略...
  9. vue.js v-for遍历对象
  10. python中的.index()函数