#Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.xkl.Dao1.UserMapper.getList2. please check com/xkl/Dao1/UserMapper.xml and class path resource [com/xkl/Dao1/UserMapper.xml]
在Spring和Mybatis的整合学习过程中,发现了这个bug找了好久(头秃)
后来才发现是在原先的Mybatis-config的配置中忘记删除:
因为在Spring-mybatis中有对Mapper的路径进行注入:
将Mybatis-config中的mapper路径注释后就可以了。
06-04
7114
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-24
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-16
1015
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-28
2356
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-13
558
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-23
81
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)