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即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章