Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session. SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.
NestedIOException: Failed to parse mapping resource: 'file [D:\workspace\Yinglibao\work\micr-dataservice\target\classes\mappers\BidInfoMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\workspace\Yinglibao\work\micr-dataservice\target\classes\mappers\BidInfoMapper.xml]'.
Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.bjpowernode.dataservice.mapper.BidInfoMapper.BaseResultMap
关键在于
Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.bjpowernode.dataservice.mapper.BidInfoMapper.BaseResultMap
原因:
是BaseResultMap
出了问题,原因是 BaseResultMap
这个结果出现了多次。
解决:
在相应文件中删除重复出现的BaseResultMap代码
。