myBatis-Generator自动生成的XML出现重复节点解决方法
先说解决方法
在 Generator 文件中加入
重复节点导致的报错信息
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXController’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXService’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘XXMapper’ defined in file [XXMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is 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 [XXMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘file [XXMapper.xml]’. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.yunji.hitomi.mappers.mapper.SysExcLogMapper.BaseResultMap
本人已解决当前问题