Error creating bean with name 'itemCatController'

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 failedError creating bean with name itemCatController: Injection of autowired dependencies failed; - 鲁大师 - 何来
         后来,检查半天后发现,是在service层,少写了一个@service,改完之后,以上错误不再出现。Error creating bean with name itemCatController: Injection of autowired dependencies failed; - 鲁大师 - 何来

转载于:https://www.cnblogs.com/tangling/p/6726605.html

Error creating bean with name错误通常是由于以下几个原因引起的:扫描不到包、导包导错、注解没加或加错、类型或类名不正确等。在排查错误时,我们可以查看报错信息中的Caused by,特别是最后一个Caused by,它往往包含了最终的错误原因。在你提供的引用中,错误的原因是连接不上本地Redis,导致了Connection refused: no further information的报错。解决该问题的方法是确保本地Redis服务处于启动状态,启动Redis服务后,项目便可以正常运行。因此,对于Error creating bean with name报错,应该仔细查看最后一个Caused by的报错问题。 另外,在引用中提到了一种解决方式,即将mysql驱动降低到8.0.18版本。这可能是针对另一个问题的解决方法,与Error creating bean with name错误可能无直接关联。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* [Error creating bean with name报错](https://blog.csdn.net/qq_43511320/article/details/129442632)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [springboot Flowable集成 Error creating bean with name ‘flowableAppEngine‘ flowableException](https://blog.csdn.net/qq_46554590/article/details/127569622)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值