Result Maps collection already contains value for
运行tomcat 报错
org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for cn.itcast.ssm.mapper.LyItemMapper.BaseResultMap at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120) at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92) at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.loadXmlResource(MapperAnnotationBuilder.java:164) at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:118) at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:71)
通过参考本页最下面的链接:https://blog.csdn.net/nocol123/article/details/73928925
发现是这个问题:把下图的 resultType 改成 resultMap
改了后记得要tomcat clean 和 eclipse的 project clean 一下, 有时候垃圾电脑会因为缓存问题, clean 失败
这时候就要想办法换一台电脑了。
参考
https://blog.csdn.net/nocol123/article/details/73928925