org.springframework.beans.factory.BeanCreationException: 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)}
你要自动注入的类注入失败@autowired,说明他没有交到spring管理,如果是controller里面注入失败,就是你的service层没有标注@service
Injection of autowired dependencies failed;自动注入失败问题
最新推荐文章于 2024-06-29 10:49:04 发布