Error creating bean with name ‘userController‘:

整个的报错提示是:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userController’: Unsatisfied dependency expressed through field ‘userService’: Error creating bean with name ‘userServiceImpl’: Unsatisfied dependency expressed through field ‘baseMapper’: No qualifying bean of type ‘xiyi.mapper.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘xiyi.mapper.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1824) ~[spring-beans-6.0.11.jar:6.0.11]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1383) ~[spring-beans-6.0.11.jar:6.0.11]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337) ~[spring-beans-6.0.11.jar:6.0.11]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713) ~[spring-beans-6.0.11.jar:6.0.11]
… 34 common frames omitted

找CauseBy后面的,No qualifying bean of type ‘xiyi.mapper.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate.
这句话说人话就是Spring找不到xiyi.mapper.UserMapper这个bean,考虑是不是xiyi.mapper.UserMapper这个类上面是不是忘记加Mapper注解了

你可能感兴趣的:(spring)