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 qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
出现这个问题的一个原因是:service组件没有扫描到
解决办法
修改spring-config.xml
加上下面这段就好了
<!-- 自动扫描,将类自动注册为bean,@Controller注解在spring mvc中扫描 --><context:component-scan base-package="com.test"><context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/></context:component-scan>
No qualifying bean of type ‘com.xxx.xx.service.xxService‘ available: expected at leas相关推荐
- 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 ...
- mapper注入失败,NoSuchBeanDefinitionException: No qualifying bean of type [com.xxx.XxxMapper] found for d
mapper注入失败: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifyin ...
- No qualifying bean of type ‘com.alibaba.dubbo.config.ApplicationConfig‘ available: expected at least
目录 前言 异常信息,应用启动异常截图 主要得报错信息 猜测原因 其他解决办法: 详细的报错日志信息 前言 主要是启动异常,开发完一个业务需求之后发现,居然有一个bean启动异常,提示的信息真的让人 ...
- No qualifying bean of type ‘com.suming.crowd.service.api.AdminService‘ available: expected at least
问题描述: 出现以上问题的主要原因还是AdminService没有加载到容器中,我遇到这个问题无非就是以下几种情况,来进行逐一排查: 1.可能存在相同的bean 2.是否开启扫描, 3.是否加载当前b ...
- No qualifying bean of type ‘com.nanjing.cms.mapper.CrmBannerMapper‘ available: expected at least 1 b
原因: Spring boot Application没有扫描到mapper 由于当初是cmsservice
- HTTP状态500 No qualifying bean of type ‘com.xlc.crud.service.EmployeeService‘ available:
今天遇到一个很烦人的问题,控制器找不到Service类. 遇到这个问题第一个肯定是去检查注解,@Controller,@Service是不是加上了,然后检查配置文件中context:component ...
- 解决——》No qualifying bean of type ‘XXX‘ available
推荐链接: 总结-->[Java] 总结-->[Mysql] 总结-->[Spring] 总结-->[SpringBoot] 解决-->N ...
- SpringBoot中出现 No qualifying bean of type ‘com.tanhua.server.mapper.UserInfoMapper‘ available: expect
在使用SpringBoot框架时出现 No qualifying bean of type 'com.tanhua.server.mapper.UserInfoMapper' available: e ...
- 解决org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 异常
在spring中出现: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of ...
最新文章
- python 字符串数组互转
- POJ 1966 Cable TV Network (最大流最小割)
- 地球十大人类禁区!让人不寒而栗
- Xcode 真机测试破解方法(转加修改)xcode 4.3 通过
- python 斐波那契数列 yield_Python中的yield到底是个什么鬼?
- jquery查找父窗体id_js/jquery如何获取父窗口的元素?
- c语言字符串不能是数字,C语言判断字符串是否为数字
- c语言不能正常输出128以上的ascii字符,C语言输出ASCII 219无法显示方格
- python 模型 欺诈概率_手把手教你使用Python实战反欺诈模型|原理+代码
- could not find driver (SQL: select * from information_schema.tables where table_schema = oliver and
- CSS 相邻兄弟选择器
- python求一组数的最大值_用python实现在一组数据中,寻找到最大数和最小数并输出最大数和最小数所在的位置...
- bls java_Java PairingFactory.getPairing方法代碼示例
- docker命令介绍,镜像制作,容器启动,进入容器操作等
- UITT私有化自动跟单系统
- 泰坦之路手机版怎么登陆服务器未响应,泰坦之旅一直登入不进去怎么办
- 用Git从Github上clone项目到Pycharm
- 基于FPGA的混沌系统实现
- 《代号:魂之刃2》- 身处黑暗的勇者游戏
- Encoder编码器、Decoder解码器