org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plansAndActionController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: public com.quick.service.PlansActionService com.quick.controller.PlansAndActionController.plansActionService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.quick.service.PlansActionService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.quick.service.PlansActionService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency
出现这个问题的原因有很多
1、service 没有加service注解
2、<context:component-scan base-package="com.xxxx.xxxx" />路径没找到