运行项目时,提示错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseController': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.baosight.rds.kubernetes.RestDao com.baosight.rds.kubernetes.DatabaseController.dao;
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.baosight.rds.kubernetes.RestDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
 
这段错误的大致含义就是:
创建name为databaseController的bean时失败了。因为找不到自动注入的变量:DatabaseController.dao。
因为这个名为dao的变量,类名是RestDao,但是在RestDao里却找不到一个自动注入的qualifies(比如@Service,@Component,@Repository,@Controller这种)。
所以要解决这个问题,就是检查RestDao类,看自己到底遗漏了哪个qualifies。
 
检查后,发现RestDao没有加@Repository。
 
 
 

2016.11.4 Injection of autowired dependencies failed的更多相关文章

  1. eclipse 启动tomcat报Spring错误 Error creating bean with name 'serviceOrderBiz': Injection of autowired dependencies failed

    启动tomcat报异常,提示Sring无法创建serviceOrderBiz(第一行红字),继续看是因为有一个自动注入的字段无法注入ModuleInterfaceBiz(第二行红字),检查servic ...

  2. Failed to load ApplicationContext ,Error creating bean with name 'adminUserService': Injection of autowired dependencies failed;

    Druid配置的时候出现这个问题: "C:\Program Files\Java\jdk1.8.0_191\bin\java" -ea -Didea.test.cyclic.buf ...

  3. IDEA报错: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.url' in value "${spring.datasource.url}"

    运行审核流模块: 在ActivitiServiceApplication模块日志报错: Error starting ApplicationContext. To display the auto-c ...

  4. Error creating bean with name 'signController': Injection of autowired dependencies failed

    出现了一大串错误,Error creating bean with name 'signController': Injection of autowired dependencies failed. ...

  5. 异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException

    这个异常是出现在注入配置文件中配置好的属性时报错的: Injection of autowired dependencies failed; nested exception is java.lang ...

  6. Injection of autowired dependencies failed

    error:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mainCo ...

  7. tomcat启动报错:Injection of autowired dependencies failed

    tomcat启动报错:Injectjion of autowired dependencies failed 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk ...

  8. Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;

    spring 个坑爹地,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ...

  9. tomcat启动报错:Injection of autowired dependencies failed

    Error creating bean with name 'backPrintPaperController': Injection of autowired dependencies failed ...

随机推荐

  1. 混淆矩阵、准确率、召回率、ROC曲线、AUC

    混淆矩阵.准确率.召回率.ROC曲线.AUC 假设有一个用来对猫(cats).狗(dogs).兔子(rabbits)进行分类的系统,混淆矩阵就是为了进一步分析性能而对该算法测试结果做出的总结.假设总共 ...

  2. (转载) Linux五种IO模型

    转载:http://blog.csdn.net/jay900323/article/details/18141217     Linux五种IO模型及分析   目录(?)[-] 概念理解 Linux下 ...

  3. application.properties 详解

    mvc spring.mvc.async.request-timeout设定async请求的超时时间,以毫秒为单位,如果没有设置的话,以具体实现的超时时间为准,比如tomcat的servlet3的话是 ...

  4. ORA-12012: 自动执行作业 "SYS"."ORA$AT_OS_OPT_SY_21" 出错

    oracle 12.2.0.1版本报错: Errors in file /u01/app/oracle/diag/rdbms/easdb/easdb2/trace/easdb2_j000_27520. ...

  5. POJ 2217:Secretary(后缀数组)

    题目大意:求两个字符串的公共子串. 分析: 模板题,将两个字符串接起来用不会出现的字符分割,然后求分属两个字符串的相邻后缀lcp的最大值即可. 代码: program work; type arr=. ...

  6. BZOJ3612 [Heoi2014]平衡 整数划分

    [Heoi2014]平衡 Time Limit: 10 Sec  Memory Limit: 256 MBSubmit: 348  Solved: 273[Submit][Status][Discus ...

  7. Array拼接字符串

    原文发布时间为:2011-01-12 -- 来源于本人的百度文章 [由搬家工具导入] Array拼接字符串本来就是一种投机取巧的无聊玩意,来源是IE6对字符串的+实现错误一般情况下,如果是语义性的字符 ...

  8. DB迁移:从SQL Server 2005到MySQL

    一.工具选择 依工作需要进行老产品升级,其中一项重要工作就是将SQL Server数据库改为MySQL数据库,故而在对<各种主流 SQLServer 迁移到 MySQL 工具对比>文章学习 ...

  9. 享元模式FlyweightPattern(转)

    解释一下概念:也就是说在一个系统中如果有多个相同的对象,那么只共享一份就可以了,不必每个都去实例化一个对象.比如说一个文本系统,每个字母定一个对象,那么大小写字母一共就是52个,那么就要定义52个对象 ...

  10. 更新到xcode10以后出现几个无奈的问题,谨已此篇告诫广大ioser升级请慎重

    1.第一次用xcode 10 archive的时候遇到的电脑卡死不动的问题,期间鼠标键盘通通都动不了,只能强制关机来解决,于是又进行了一次可还是遇到相同的问题,无奈之下只能等待,大约20分钟左右(20 ...