如果在SSM整合的时候出现以下的错误:
留意一下是不是既在Mybatis配置文件中加载了映射文件,又在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
本文解决了一个常见的SSM整合问题,即Mybatis映射文件重复加载导致的错误。阐述了如何避免在Mybatis配置文件与Spring配置文件中同时加载映射文件。
8309

被折叠的 条评论
为什么被折叠?



