Error creating bean with name 'itemCatController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taotao.service.ItemCatService com.taotao.controller.ItemCatController.itemCatService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.taotao.service.ItemCatService] 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)}
今天,在开发项目的时候,遇到这个问题:Error creating bean with name 'itemCatController': Injection of autowired dependencies failed;
后来,检查半天后发现,是在service层,少写了一个@service,改完之后,以上错误不再出现。