No qualifying bean of type 'org.jeecg.common.api.CommonAPI' available: expected at least 1
时间: 2023-11-10 08:17:31 浏览: 274
报错信息中指出没有找到符合自动装配条件的类型为 'org.jeecg.common.api.CommonAPI' 的bean。这个问题的解决方法有两种。
方法一是在相关的类上使用 @Mapper 注解。这个注解可以帮助Spring识别并正确初始化对应的bean。
方法二是检查相关类的构造函数。报错信息中提到是因为Spring默认使用无参构造函数进行bean的初始化,但是实际上需要使用有参构造函数。所以应该添加一个只有一个入参的构造函数来满足需要。
此外,根据引用的API响应结果,我没有找到与这个报错信息直接相关的信息。请问是否还有其他引用内容可以提供?<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【报错】No qualifying bean of type ‘com...mapper.ProductMapper‘ available: expected at least 1 ......](https://blog.csdn.net/weixin_51773780/article/details/129180034)[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: 33.333333333333336%"]
- *2* [No qualifying bean of type ‘java.lang.String‘ available: expected at least 1 bean which qualifies](https://blog.csdn.net/Saintmm/article/details/125941552)[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: 33.333333333333336%"]
- *3* [java种菜源码-springboot-elasticsearch:使用springboot进行spring-data-elastic搜索的示](https://download.csdn.net/download/weixin_38724106/19406400)[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: 33.333333333333336%"]
[ .reference_list ]
阅读全文