tomcat启动报错:Injection of autowired dependencies failed
Error creating bean with name 'backPrintPaperController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqxkzxxService com.chinauip.cfc.business.labre.lwpq.view.BackPrintPaperController.tblabrelatlwpqxkzxxService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tblabrelatlwpqxkzxxService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqdwxxService com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqxkzxxService.tblabrelatlwpqdwxxService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tblabrelatlwpqdwxxService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqdwxxService com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqdwxxService.tblabrelatlwpqdwxxService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: [com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqdwxxService] 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)}
1.检查第一个错误:tblabrelatlwpqxkzxxService类发生:Could not autowire field
不能 private com.chinauip.cfc.business.labre.lwpq.service.TblabrelatlwpqdwxxService
为什么不能 autowire TblabrelatlwpqdwxxService类呢?
2.检查第二个错误:No matching bean ...注入失败.
靠....原来自己把自己注入了.好吧,又是copy惹的祸.!!!!
回复:@ Wangcaiyun
我这里引起错误原因是 因为在类里面 自动注入了本身.
只要把那两行代码删除就正常了.
忘记把解决方案写出来了
tomcat启动报错:Injection of autowired dependencies failed的更多相关文章
- 使用Mybatis整合spring时报错Injection of autowired dependencies failed;
这是无法自动注入,通过查找,我出错的原因在于配置文件的路径没有写对,在applicationContext.xml中是这样写的. <bean id="sqlSessionFactory ...
- tomcat 启动报错org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].xxx
今天在写完一个非常简单的servlet页面跳转的web项目后,启动tomcat报错org.apache.catalina.LifecycleException: Failed to start com ...
- Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component...java.util.zip.ZipException: error in opening zip file
1.项目环境 IntelliJ IDEA2018.1.6 apache-tomcat-8.0.53 基于springboot开发的项目 maven3.5.3 2.出现问题 从svn同步下项目 启动to ...
- tomcat 启动报错org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin
IDEA tomcat 7.0.53 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed ...
- Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin
Error starting ApplicationContext. To display the auto-configuration report re-run your application ...
- tomcat启动报错:A child container failed during start
环境:maven3.3.9+jdk1.8+tomcat8.5 错误详细描述: 严重: A child container failed during start java.util.concurren ...
- tomcat启动报错:Injection of autowired dependencies failed
tomcat启动报错:Injectjion of autowired dependencies failed 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk ...
- eclipse 启动tomcat报Spring错误 Error creating bean with name 'serviceOrderBiz': Injection of autowired dependencies failed
启动tomcat报异常,提示Sring无法创建serviceOrderBiz(第一行红字),继续看是因为有一个自动注入的字段无法注入ModuleInterfaceBiz(第二行红字),检查servic ...
- 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 ...
随机推荐
- Makefile 10——打造更专业的编译环境-huge项目
先手工创建几个文件目录: 接下来先创建code/foo/src目录下的Makefile: .PHONY: all clean MKDIR = mkdir RM = rm RMFLAGS = -rf C ...
- osgi实战学习之路:6. Service-1
什么是Service? 它是注冊到osgi的一个java对象 Service注冊: 通过BundleContext::registerService(java.lang.String[] clazze ...
- 正则 群组 Group
static void Main(string[] args) { string strUrl = "<a href=\"user.php?act=order_detail& ...
- 5分钟用Spring4 搭建一个REST WebService(转)
章节目录 前置技能 新建项目,配置依赖文件 编写Model和Controller 启动服务&访问 但是 其他 前置技能 ① 使用maven来管理java项目 这个技能必须点一级,以便快速配置项 ...
- centos7 /etc/rc.local需要chmod +x /etc/rc.d/rc.local
Centos 7.0设置/etc/rc.local无效问题解决 安装centos7以后按照以往习惯修改rc.local添加开机启动命令,但重启后发现无效,再次重启发现依然如故 检查系统rc.local ...
- Go语言中字符串的查找方法小结
这篇文章主要介绍了Go语言中字符串的查找方法小结,示例的main函数都是导入strings包然后使用其中的方法,需要的朋友可以参考下 1.func Contains(s, substr strin ...
- thinkphp 如何调用百度echarts 数据报表插件
echarts官网网址:http://echarts.baidu.com/ echarts源码地址:http://echarts.baidu.com/build/echarts-2.2.7.zip ...
- thinkphp 原生sql使用分页类
public function index(){ import("@.ORG.Page"); //导入分页类 $Dao = M(); $count = count($Dao-> ...
- 如果可能的话,使用 PC-Lint、LogiScope 等工具进行代码审查
如果可能的话,使用 PC-Lint.LogiScope 等工具进行代码审查. #include <iostream> #include <algorithm> #include ...
- 【BZOJ】1630: [Usaco2007 Demo]Ant Counting(裸dp/dp/生成函数)
http://www.lydsy.com/JudgeOnline/problem.php?id=1630 题意,给你n种数,数量为m个,求所有的数组成的集合选长度l-r的个数 后两者待会写.. 裸dp ...