Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'bookDao' available
时间: 2023-10-15 09:28:22 浏览: 208
测试spring中的org.springframework.beans.factory.InitializingBean
这个异常是由于Spring容器中没有名为'bookDao'的bean所引起的。在你的代码中,可能缺少了对'bookDao'的配置或者没有正确注入'bookDao'的依赖。请确保在Spring配置文件中正确配置了'bookDao'的bean,并且在需要使用'bookDao'的地方正确注入了该依赖。另外,也要确保'bookDao'所在的包在Spring的组件扫描范围内。如果仍然存在问题,请检查你的代码和配置是否正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Spring报错org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘book‘ ...](https://blog.csdn.net/qq_61222203/article/details/124947800)[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* *3* [SpringBoot整合的Mybatis出现的问题:org.springframework.beans.factory.NoSuchBeanDefinitionException:](https://blog.csdn.net/xxxx12354343/article/details/129217937)[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 ]
阅读全文