No qualifying bean of type ‘com.suming.crowd.service.api.AdminService‘ available: expected at least
问题描述:
出现以上问题的主要原因还是AdminService没有加载到容器中,我遇到这个问题无非就是以下几种情况,来进行逐一排查:
1.可能存在相同的bean
2.是否开启扫描,
3.是否加载当前bean
4.是否加载xml配置
5.是否扫描出问题,或者没有扫描到当前类
我遇到的问题如下所示:
很明显是service没有加载成功,按照上述步骤进行排查,我的问题就是web.xml的配置导致没有成功加载spring-persist-mybatis
和spring-persist-tx
配置文件,由于service
包的扫描就在spring-persist-tx
文件中,自然无法加载。
问题排查过程如下:
(1)查看web.xml中的配置有没有正常加载,我先将上下文加载器中的-*
换成具体名称spring-persist-tx
,发现问题变成了mapper文件无法加载(因为我的mapper包扫描在spring-persist-mybatis
配置文件中),因此定位问题是由于-*
无法加载配置文件引起的问题
(2)将spring-persist-mybatis
也加入web.xml中
问题解决!!!!
综上,可以根据你遇到的情况来进行排查,看是否是配置文件无法加载或没有正确配置引起的加载失败问题。希望能对有相关问题的人一点思路。
No qualifying bean of type ‘com.suming.crowd.service.api.AdminService‘ available: expected at least相关推荐
- No qualifying bean of type ‘com.xxx.xx.service.xxService‘ available: expected at leas
No qualifying bean of type 'com.xxxx.xx.service.xxService' available: expected at least 1 bean which ...
- No qualifying bean of type 'com.xxx.xx.service.xxService' available: expected at leas
No qualifying bean of type 'com.xxxx.xx.service.xxService' available: expected at least 1 bean which ...
- No qualifying bean of type ‘com.situ.mall.admin.mapper.UserMapper‘ available: expected at least 1 be
No qualifying bean of type 'com.situ.mall.admin.mapper.UserMapper' available: expected at least 1 be ...
- No qualifying bean of type ‘com.alibaba.buc.acl.api.service.MenuReadService‘ available
resource dependencies failed 接入阿里云acl时,报MenuReadService的bean无效.找了MenuReadService接口对应的实现类,没有找到,修改了各种m ...
- HTTP状态500 No qualifying bean of type ‘com.xlc.crud.service.EmployeeService‘ available:
今天遇到一个很烦人的问题,控制器找不到Service类. 遇到这个问题第一个肯定是去检查注解,@Controller,@Service是不是加上了,然后检查配置文件中context:component ...
- No qualifying bean of type ‘xxx‘的问题解决方案
在Springboot启动的时候报错误: No qualifying bean of type 'com.gzhc365.mix.http.api.HttpApi' available: expect ...
- 【SpringCloud】feign.codec.EncodeException: No qualifying bean of type
错误描述 在 Spring Cloud 项目中通过 Open Feign 远程调用时出现如下错误: feign.codec.EncodeException: No qualifying bean of ...
- No qualifying bean of type ‘org.apache.rocketmq.spring.core.RocketMQTemplate‘ av
前言 整合springboot+rocketMq报错 错误信息如下: org.springframework.beans.factory.NoSuchBeanDefinitionException: ...
- 项目启动报错:No qualifying bean of type ‘xxx‘ available:
项目启动报错: Description: A component required a bean of type 'cn.hsa.its.abutment.bo.BusinessAcceptBo' t ...
最新文章
- IPod在Linux下的实战
- mysql keepalived双主双活_Keepalived单网络双活双主配置模式
- 教育类产品如何快速建立师生关联关系?
- 你可能不需要固定词表:一种与词表无关的组合式词向量方法
- opencv进阶学习笔记7:直方图,直方图均衡化,直方图比较,直方图反向投影
- NullPointerException int java.util.List.size()
- Oracle10g数据库的完全卸载:
- gddr6速率_Rambus展示18GT/s的GDDR6内存子系统:高频信号纯净度仍然非常好
- 2018中国国际大数据大会专属报名通道(粉丝专享)开通啦!
- [导入]mootools框架【三】-Array篇: 主要方法测试实例
- mac下安装caffe
- (大数据工程师学习路径)第二步 Vim编辑器----Vim文档编辑
- 韩顺平--Java坦克大战
- linux 系统添加字体,linux服务器下添加字体
- 微信卡包系列-核销微信卡券优惠券
- Windows10超级管理员账号权限受限的问题
- 抖音 iOS 工程架构演进
- 【将门创投】如何让飘在半空的计算机视觉技术与需求落地?
- 漫画:为什么不能打断程序员
- 《寂静之城》未删节版
热门文章
- Pytorch 多进程在单卡上测试
- 给 Web 前端开发人员推荐20款 CSS 编辑器
- 软件工程课程-结对编程项目
- C#_配置文件读取(含:ASP.NET CORE 、Winform)
- Matlab图像处理(1)彩色图像转换为灰度图像(初学必看)
- win10+cuda10.1+cudnn+opencv3.4.2+yolov3+vs2017安装教程
- python语法大全-Python基本语法大全
- Android OneAPM试用
- 1024程序员日:有奖答题,全“猿”狂欢!(无套路,100%中奖)
- iOS编程基础-Swift(三)-变量与简单类型