Mybatis出现Mapped Statements collection already contains value for
错误原因总结:
1.mapper中存在id重复的值
2.mapper中的parameterType或resultType为空。
3. 在使用@Select等注解的情况下,方法名即为mapper的id,重载的方法会报这个错。
4. mapper复制 忘了改namespace指向的类,所以两个mapper指向同一个mapper,所以报了这个错。
5.parameterType或者resultType里的com.你的项目.某类 构造方法或getter/setter出错 也会报这个出错
参考:Mapped Statements collection already contains value for报错问题解决方法_宁小仙的博客-CSDN博客