No matching bean of type [xx] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency
这个看起来很弱爆的问题其实是因为其他的配置文件中已经出现了为xx定义好的注入.如果用@Autowired就会得到上面的错误 , 但是用@Resource的时候就会看到类似下面的错误
Bean named 'moneyRecordDao' must be of type [com.fuscent.core.dao.MoneyRecordDao], but was actually of type [com.yooli.currentproduct.dao.impl.MoneyRecordDaoImpl]
感觉自己弱爆了啊.
No matching bean of type [xx] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency的更多相关文章
- NoSuchBeanDefinitionException:No qualifying bean of type found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.
报错如下: NoSuchBeanDefinitionException:No qualifying bean of type found for dependency: expected at l ...
- mybatis expected at least 1 bean which qualifies as autowire candidate for this dependency
错误原因:没有引入相应mapper接口,导致spring没有找到依赖 解决方法一:使用注解的方法: 首先在spring配置文件中添加 <bean class="org.mybatis. ...
- spring加载bean报错:expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
看具体报错日志: 警告: Unable to proxy interface-implementing method [public final void cn.wlf.selection.proto ...
- 多个@bean无法通过@resource注入对应的bean(org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected single matching bean but found )
一.异常 org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type ' ...
- 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'
1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...
- Caused by:org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type "" available: expected at least 1 bean which qualifies as autowire candidate
项目使用spring, mybatis.因为分了多个模块,所以会这个模块引用了其它模块的现在,结果使用Junit测试的时候发现有两个模块不能自动注入dao和service问题.解决后在此记录一下. 解 ...
- springboot available: expected at least 1 bean which qualifies as autowire candidate奇葩问题
Exception encountered during context initialization - cancelling refresh attempt: org.springframewor ...
- Consider defining a bean of type 'XX.XX.XX.XX.mapper.XXMapper' in your configuration.
今天构建一个springboot 项目,采用mybatis+mysql 然后就出现了这种错误....浪费我半天时间 Description: Field loginLogMapper in com.g ...
- 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.
运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...
随机推荐
- [AC自动机]题目合计
我只是想记一下最近写的题目而已喵~ 题解什么的才懒得写呢~ [poj 1625]Censored! 这题注意一个地方,就是输入数据中可能有 ASCII 大于 128 的情况,也就是说用 char 读入 ...
- ps调整图层
自然饱和度:自然饱和度命令和色相饱和度命令里的饱和度相比最大的区别是自然饱和度只增加未达到饱和的颜色的饱和度,而饱和度命令则增加整个图像的饱和度,可能会导致图像颜色过于饱和,而自然饱和度不会出现这种问 ...
- java DecimalFormat
public class Test{ public static void main(String[] args) throws Exception{ /*DecimalFormat参数,如果是0则会 ...
- MUA
a big deal analysis analytics cooperate 合作 efficient explicitly fine grained Granularity graph geogr ...
- JSBinding / Run Samples
This document shows you how to run JSBinding 2048 sample in Editor. First of course, create an empty ...
- css float对于之后布局的影响
后面的元素不浮动,即便设置了宽度,表面上只占了一定的宽度,但实际上占了全屏.(所以设置了overflow之后,并且之后的div设置了宽度,再设置margin-left可能不起作用). 高度对浮动的影响 ...
- Python-正则零宽断言及命名捕获(类PHP)
(一)零宽断言 说明:本文的例子使用python描述 首先说明一下什么是零宽断言,所谓零宽断言就是并不去真正的匹配字符串文本,而仅仅是匹配对应的位置. 正则表达式中有很多这样的断言 ...
- python2.7处理https稍微好点的办法(坑得一笔)
from warnings import filterwarnings filterwarnings('ignore') r = requests.get(url, headers=headers, ...
- javascript this 代表的上下文,JavaScript 函数的四种调用形式
JavaScript 是一种脚本语言,支持函数式编程.闭包.基于原型的继承等高级功能.其中JavaScript 中的 this 关键字,就是一个比较容易混乱的概念,在不同的场景下,this会化身不同的 ...
- linux服务之lvs
开发语言: 服务器端:在内核中实现,无守护程序 客户端:一般是cli界面下的ipvsadm命令 相关包:ipvsadm 在LVS框架中,提供了含有三种IP负载均衡技术的IP虚拟服务器软件IPVS.基于 ...