mybatis报错之Result Maps collection already contains value for ...xxxxMapper.BaseResultMap

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [......\target\classes\mapping\xxxMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for .....dao.xxxxMapper.BaseResultMap

 上面的意思为在[......\target\classes\mapping\xxxMapper.xml]里面 BaseResultMap 被重复定义了   删除多余的就ok了

通常出现该问题的原因是  使用mybatis-generator生成xml时文件已经存在这时xml里的元素会多出来一份 解决办法 干掉或者清空目标xml即可

你可能感兴趣的:(JAVA)