rror creating bean with name 'adminController': Injection of autowired dependencies failed;

来源:互联网 发布:cnn student news 软件 编辑:程序博客网 时间:2024/05/20 13:04
org.springframework.context.support.AbstractApplicationContext.refresh(487) | Exception encountered during context initialization - cancelling refresh attemptorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.pwc.VisaQuiz.service.CorrectRateService com.pwc.VisaQuiz.controller.AdminController.correctRateService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.pwc.VisaQuiz.service.CorrectRateService] 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)}at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
报错原因是<p>Service的implement丢失了@Service("CorrectRateService")</p>


0 0