若是在SSM整合的時候出現如下的錯誤:java
留意一下是否是既在Mybatis配置文件中加載了映射文件,又在Spring配置文件中使用掃描式去加載映射文件了。二者是不可以重合使用的!spring
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\SSM\out\production\SSM\zhongfucheng\dao\DeptMapper.xml]'; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for zhongfucheng.entity.DeptMapper.deptResultMap