几次遇到这种错误总结一下;
某个或某些Mapper.xml出现重复了
具体是哪个 可以继续看
Error parsing Mapper XML. The XML location is 'file [D:\test\motai\motai-demo\target\classes\com\spring\coding\motai\mbg\mapper\PmsBrandMapper.xml]'. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.spring.coding.motai.mbg.mapper.PmsBrandMapper.BaseResultMap
就是 PmsBrandMapper.xml解析错误
果然 检查文件中有重复内容 原来是我使用mbg逆向工程生成了两次,而mapper.xml出现重复又无法覆盖.
还有一种可能就是 文件本身重复了,如下图:
这种情况,在同一模块,容易发现
有次居然在不同模块中,有相同的xml也报错,目测是因为
这里的一些配置,让工程扫描到其他模块放置饿xml了吧........
复现了一下问题: