Injection of autowired dependencies failed;
来源:互联网 发布:单词社交网络学后即焚 编辑:程序博客网 时间:2024/06/13 21:50
1. 给ConfigController中添加了一个属性:
@Autowired
private TypeService typeService;
结果启动Tomcat时报错,
[2014-10-14 11:47:28,881] Artifact application-mobile-web:war exploded: Deploy took 6,384 milliseconds
11:47:29,842 ERROR org.springframework.web.servlet.DispatcherServlet (457) - Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tcl.component.mobile.biz.service.TypeService com.tcl.application.mobile.web.controller.ConfigController.typeService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.tcl.component.mobile.biz.service.TypeService] 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)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
后面参考这篇文章时找到解决方案(http://blog.csdn.net/xb12369/article/details/38470231),我的TypeServiceImpl,少了一个@Service,添加上重新启动时就没有问题了。
0 0
- Injection of autowired dependencies failed
- Injection of autowired dependencies failed;
- Injection of autowired dependencies failed
- Injection of autowired dependencies failed
- error:Injection of autowired dependencies failed
- Error creating bean with name '****': Injection of autowired dependencies failed
- ava 注解 出错 Injection of autowired dependencies failed
- Spring Boot异常:BeanCreationException:Injection of autowired dependencies failed;
- tomcat启动报错:Injection of autowired dependencies failed
- debug报错injection of autowired dependencies failed
- BeanCreationException:Injection of autowired dependencies failed异常的解决思路
- Spring Boot异常:BeanCreationException:Injection of autowired dependencies failed;
- BeanCreationException:Injection of autowired dependencies failed异常的解决思路
- Injection of resource dependencies failed
- Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;
- Injection of autowired dependencies failed ( mybatis进行数据处理的四种方式 )
- Error creating bean with name 'xx': Injection of autowired dependencies failed
- Error creating bean with name 'xxxx': Injection of autowired dependencies failed;
- ios默认的字体大小单位为pt
- ubuntu12.04安装AMD显卡驱动
- > /dev/null 2>&1
- JavaWeb - XML
- CSS3 动态生成文字旋转动画样式
- Injection of autowired dependencies failed;
- 利用Xtrabackup工具备份及恢复(转)
- java值传递,引用传递,数组传递
- UVA - 712 S-Trees
- fedora 安装程序并在桌面创建快捷方式
- Zookeeper原理
- 我们都是好孩子
- Android网络编程
- JDBC编程技术基本-数据库访问示例