这个看起来很弱爆的问题其实是因为其他的配置文件中已经出现了为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的更多相关文章

  1. 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 ...

  2. mybatis expected at least 1 bean which qualifies as autowire candidate for this dependency

    错误原因:没有引入相应mapper接口,导致spring没有找到依赖 解决方法一:使用注解的方法: 首先在spring配置文件中添加 <bean class="org.mybatis. ...

  3. 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 ...

  4. 多个@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 ' ...

  5. 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'

    1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...

  6. 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问题.解决后在此记录一下. 解 ...

  7. springboot available: expected at least 1 bean which qualifies as autowire candidate奇葩问题

    Exception encountered during context initialization - cancelling refresh attempt: org.springframewor ...

  8. Consider defining a bean of type 'XX.XX.XX.XX.mapper.XXMapper' in your configuration.

    今天构建一个springboot 项目,采用mybatis+mysql 然后就出现了这种错误....浪费我半天时间 Description: Field loginLogMapper in com.g ...

  9. 运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

    运行springboot项目报错: *************************** APPLICATION FAILED TO START ************************** ...

随机推荐

  1. Java——异常

     /* * 异常:   是在运行时期  发生的 不正常情况. *  在java中类的形式对不正常情况进行了描述和封装对象. * * 描述不正常的情况类,就成为异常. * * 问题很多,就意味着描述 ...

  2. Questions?

    http://www.datastax.com/wp-content/themes/datastax-2014-08/files/NoSQL_Benchmarks_EndPoint.pdf http: ...

  3. Linux-理解ARP、网关、路由

    假设你叫小不点(本地主机),住在一个大院子(本地局域网)里,有很多邻居(网络邻居),门口传达室有个看大门的李大爷,李大爷就是你的网关.当你想跟院子里的某个伙伴玩,只要你在院子里大喊一声他的名字(pin ...

  4. Oracle升级前备份和失败回退

    一.升级前备份 1.软件备份[root@localhost backup]# su - oracle [oracle@localhost ~]$ cd $ORACLE_HOME[oracle@loca ...

  5. Tensorflow 上手——手写数字识别

    下面代码是Tensorflow入门教程中的代码,实现了一个softmax分类器. 第4行是将data文件夹下的mnist数据压缩包读取为tf使用的minibatch字典. 第6-11行定义了所用的变量 ...

  6. c++ 读写注册表

    void RegUpdate(HKEY hRootKey,LPCSTR szSubKey,LPCSTR szValueName,LPCSTR szValue) { HKEY hKey; LONG rc ...

  7. Python_进程、线程及协程

    一.Python进程 IO密集型----多线程 计算密集型----多进程 1.单进程 from multiprocessing import Process def foo(i): print('你好 ...

  8. MySQLdb模块的安装

    在WINDOWS环境连接利用python连接MYSQL数据库的时候,需要安装python工具包MySQL-python,但是直接用pip install安装会出错,错误信息如下: _mysql.c(4 ...

  9. sqlserver修改某列为行号

    UPDATE t_users  SET t_users.id=u.num1 FROM t_users INNER JOIN (SELECT row_number() over(order by id) ...

  10. R(六): RODBC 访问SqlServer

    在我的实际工作中,数据来源一方面是关系型数据库MS SqlServer, 别一方面是HBase.本节主要介绍通过RODBC访问MS SqlServer 安装配置,参见资料(https://msdn.m ...