运行项目时,提示错误:

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. [19/02/23]ToolsShare 工具分享 VPNTethering Android (Root Required)

    To be short, VPN Tethering is a quite useful tool when you want to share your private network with s ...

  2. [oldboy-django][1初识django]阻止默认事件发生 + ajax + 模态编辑对话框

    阻止默认事件发生 a 阻止a标签默认事件发生方法 <a href="http://www.baidu.com" onclick="modalEdit();" ...

  3. [转]Pycharm 断点调试方法

    转自: https://blog.csdn.net/u013088062/article/details/50216015

  4. koa2在node6中如何运行

    koa2在node6下运行 { "babel-core": "^6.24.1", "babel-plugin-syntax-async-functio ...

  5. Vue2.0 - 构造器的延伸 Vue.extend

    Vue.extend 返回的是一个“扩展实例构造器”,也就是预设了部分选项的Vue实例构造器.经常服务于Vue.component用来生成组件,可以简单理解为当在模板中遇到该组件名称作为标签的自定义元 ...

  6. Dos中查看mysql数据时 中文乱码

    使用jsp页面查看数据时可以正确显示中文,但是dos窗口查看数据时中文显示乱码. 上网查了一下原因:之所以会显示乱码,就是因为MySQL客户端输出窗口显示中文时使用的字符编码不对造成的,可以使用如下的 ...

  7. 用canvas绘制android机器人

    直接上代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UT ...

  8. h5 video切换到横屏全屏

    将video设置为屏幕大小,覆盖其他元素,想到这种操作我也是震惊的 function() { let startIcon = document.getElementById('start-icon') ...

  9. Sql常用日期格式

    原文发布时间为:2010-09-16 -- 来源于本人的百度文章 [由搬家工具导入] SQL Server中文版的默认的日期字段datetime格式是yyyy-mm-dd Thh:mm:ss.mmm ...

  10. FusionCharts参数大全

    原文发布时间为:2010-01-11 -- 来源于本人的百度文章 [由搬家工具导入] Fusioncharts 参数 objects ANCHORS 锚点 用于标识line或area的数值点 支持效果 ...