這個錯誤是怎么回事.UnsatisfiedDependencyException
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'app': Unsatisfied dependency expressed through field 'userDOMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDOMapper' defined in file [/Users/Tony/Documents/workspace/miaosha/target/classes/com/miaoshaproject/dao/UserDOMapper.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 [/Users/Tony/Documents/workspace/miaosha/target/classes/mapping/UserDOMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.miaoshaproject.dao.UserDOMapper.BaseResultMap
2020-02-15
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dbValidator': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [/Volumes/Backup Plus/貓眼/coding-273/源碼/用戶模塊/guns/guns-user/target/classes/com/stylefeng/guns/rest/common/persistence/dao/UserMapper.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 [com/baomidou/mybatisplus/spring/boot/starter/MybatisPlusAutoConfiguration.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 com.baomidou.mybatisplus.exceptions.MybatisPlusException: Error: GlobalConfigUtils setMetaData Fail !? Cause:java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
2019-08-29
統一回復:mybatis-generator.xml重新生成Mapper.xml時把之前的xml刪除再次運行
2019-05-08
這個好像是每一次運行mybatis-generator命令時會在UserDOMapper.xml和UserPasswordDOMapper.xml中重復生成resultmap的原因,找到重復的刪除就好
2019-05-08
解決了么,我也碰到在這個問題了
2018-12-19
IllegalArgumentException: Result Maps collection already contains value for com.miaoshaproject.dao.UserDOMapper.BaseResultMap
你看下是不是有 resultMap 的 id 重復了,復制之后忘記修改id?