Error message:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'passportController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'usersMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usersMapper' defined in file [D:\__study\web\imooc\foodie-dev - 副本\foodie-dev-mapper\target\classes\com\imooc\mapper\UsersMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map 'com.imooc.mapper.CategoryMapperCustom.' referenced from 'com.imooc.mapper.CategoryMapperCustom.getSubCatList' at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.7.jar:5.3.7] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.7.jar:5.3.7] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:337) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325) [spring-boot-2.5.0.jar:2.5.0] at com.imooc.Application.main(Application.java:22) [classes/:na] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'usersMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usersMapper' defined in file [D:\__study\web\imooc\foodie-dev - 副本\foodie-dev-mapper\target\classes\com\imooc\mapper\UsersMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map 'com.imooc.mapper.CategoryMapperCustom.' referenced from 'com.imooc.mapper.CategoryMapperCustom.getSubCatList' at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.7.jar:5.3.7] ... 20 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usersMapper' defined in file [D:\__study\web\imooc\foodie-dev - 副本\foodie-dev-mapper\target\classes\com\imooc\mapper\UsersMapper.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find result map 'com.imooc.mapper.CategoryMapperCustom.' referenced from 'com.imooc.mapper.CategoryMapperCustom.getSubCatList' at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.7.jar:5.3.7] ... 34 common frames omitted Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not find result map 'com.imooc.mapper.CategoryMapperCustom.' referenced from 'com.imooc.mapper.CategoryMapperCustom.getSubCatList' at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:396) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:285) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:113) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.session.Configuration.lambda$buildAllStatements$2(Configuration.java:860) ~[mybatis-3.5.5.jar:3.5.5] at java.util.Collection.removeIf(Collection.java:414) ~[na:1.8.0_201] at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:859) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.session.Configuration.getMappedStatements(Configuration.java:755) ~[mybatis-3.5.5.jar:3.5.5] at tk.mybatis.mapper.mapperhelper.MapperHelper.processConfiguration(MapperHelper.java:279) ~[mapper-core-1.1.5.jar:na] at tk.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:93) ~[mapper-spring-1.1.5.jar:na] at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845) ~[spring-beans-5.3.7.jar:5.3.7] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-5.3.7.jar:5.3.7] ... 44 common frames omitted Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.imooc.mapper.CategoryMapperCustom. at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:1009) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:718) ~[mybatis-3.5.5.jar:3.5.5] at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:394) ~[mybatis-3.5.5.jar:3.5.5] ... 55 common frames omitted
Error reason: the method in mybatis does not write resultmap. In fact, the error report has given the problem:
Could not find result map 'com.imooc.mapper.CategoryMapperCustom.' referenced from 'com.imooc.mapper.CategoryMapperCustom.getSubCatList'。
Similar Posts:
- [Solved] SpringbootExpection 1: Error creating bean with name ‘xxxImpl’: Unsatisfied dependency expressed through field
- [Solved] No qualifying bean of type ‘org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder’ available:
- [Solved] Dependency injection exception: org.springframework.beans.factory.UnsatisfiedDependencyException
- [Solved] Error creating bean with name ‘orderController’: Unsatisfied dependency expressed through field ‘orderService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
- [Solved] Cause: java.lang.ClassNotFoundException: Cannot find class: xxxx
- [Solved] java.lang.IllegalStateException: Failed to introspect Class xxxx
- [Solved] Springboot Use Redis Error: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘redisTemplate’ defined in class path resource
- [Solved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userHandler’: Injection of resource dependencies failed;
- org.springframework.beans.factory.BeanCreationException: Could not autowire field org.springfram… [How to Solve]
- [Solved] Failed to instantiate [applets.nature.mapper.LogInfoMapper]: Specified class is an interface