Could not autowire. No beans of 'BankQuestionMapper' type found.
时间: 2023-10-28 08:23:48 浏览: 53
"Could not autowire. No beans of 'BankQuestionMapper' type found." 错误意味着在自动注入过程中找不到 'BankQuestionMapper' 类型的 bean。这通常是由于以下原因导致的:
1. 没有在应用程序的上下文中定义 'BankQuestionMapper' 的 bean。你需要确保在配置文件或注解中正确地定义了该 bean。
2. 'BankQuestionMapper' 类没有被正确地扫描到。你需要确保 'BankQuestionMapper' 类的包路径被正确地包含在扫描路径中。
3. 'BankQuestionMapper' 类没有被正确地命名或标记为一个 bean。你需要确保该类被正确地命名,并且使用了适当的注解(如@Component)来标记为一个 bean。
请检查以上原因,并确保配置和定义的正确性以解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Could not autowire. No beans of ‘xxxMapper‘ type found.](https://blog.csdn.net/m0_58019259/article/details/130526726)[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* [Could not autowire. No beans of ‘XXX‘ type found](https://blog.csdn.net/weixin_44096133/article/details/128679145)[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 ]
阅读全文