Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'subscribeManagerService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'subscribeManagerServiceImpl': Unsatisfied dependency expressed through field 'subscribeManagerMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.slyy.input1400stream.mapper.SubscribeManagerMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
时间: 2023-10-12 20:05:32 浏览: 219
测试spring中的org.springframework.beans.factory.InitializingBean
这个异常是由于Spring容器在初始化时无法满足依赖关系引起的。具体来说,当容器尝试创建名为'authController'的bean时,发现它依赖于'authService',而'authService'又依赖于'subscribeManagerService',而'subscribeManagerService'又依赖于'subscribeManagerMapper',但是容器中找不到类型为'com.slyy.input1400stream.mapper.SubscribeManagerMapper'的bean,因此导致了这个异常。解决方法是需要在Spring容器中注入一个合适的'com.slyy.input1400stream.mapper.SubscribeManagerMapper'类型的bean。可能需要检查相关的配置文件或代码以确保正确配置了bean。
阅读全文