Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;
spring 个坑爹地,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
下面的错误:
- 2014-08-10 15:19:02.751 [main] ERROR o.s.web.servlet.DispatcherServlet - Context initialization failed
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminUserController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.jsoft.service.IAdminUserService cn.com.jsoft.controller.AdminUserController.service; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.jsoft.service.IAdminUserService] 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:288) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) ~[spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) ~[spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) ~[spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) ~[spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) ~[spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
- at javax.servlet.GenericServlet.init(GenericServlet.java:212) [servlet-api.jar:2.5.MR2]
- at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734) [catalina.jar:6.0.35]
- at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) [catalina.jar:6.0.35]
- at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) [catalina.jar:6.0.35]
- at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) [catalina.jar:6.0.35]
- at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) [catalina.jar:6.0.35]
- at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardService.start(StandardService.java:525) [catalina.jar:6.0.35]
- at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) [catalina.jar:6.0.35]
- at org.apache.catalina.startup.Catalina.start(Catalina.java:595) [catalina.jar:6.0.35]
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_13]
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_13]
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_13]
- at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_13]
- at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.35]
- at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.35]
请检查:
1,service是否存在,比如你复制的时候掉了;
2,service是否有@service标识;
3,耐着性子看。
Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;的更多相关文章
- eclipse 启动tomcat报Spring错误 Error creating bean with name 'serviceOrderBiz': Injection of autowired dependencies failed
启动tomcat报异常,提示Sring无法创建serviceOrderBiz(第一行红字),继续看是因为有一个自动注入的字段无法注入ModuleInterfaceBiz(第二行红字),检查servic ...
- Error creating bean with name 'signController': Injection of autowired dependencies failed
出现了一大串错误,Error creating bean with name 'signController': Injection of autowired dependencies failed. ...
- 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 ...
- Error creating bean with name 'contentCategoryController': Injection of autowired dependencies failed;
在springmvc.spring.mybatis搭建的工程中出现了一大串错误 查了代码后发现,原来是在ContentCategoryServiceImpl中忘了写一句话@Service(),以至于因 ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- Error creating bean with name 'testController': Injection of resource dependencies failed;
启动ssm项目报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 't ...
- Java报错:Error creating bean with name 'testController': Injection of resource dependencies failed
报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testCo ...
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fundService': Injection of resource dependencies failed;
在进行SSM的Controller的编写, 从浏览器访问后端Controller的时候遇到了这个问题. 这个问题的描述: 创建Bean的对象失败 错误代码如下: @Service("fund ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supplierAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factor
这个错误是因为抽象Action类的时候,把ServletContext写成了serverContext,导致无法注入,正确写法是 import javax.annotation.Resource; i ...
随机推荐
- 浅谈js设计模式之单例模式
单例模式的定义是:保证一个类仅有一个实例,并提供一个访问它的全局访问点. 单例模式是一种常用的模式,有一些对象我们往往只需要一个,比如线程池.全局缓存.浏览器中的 window 对象等.在 JavaS ...
- android studio实现Intent通信-------牛刀小试
概述: 本博文实现一种小程序,两个Activity单向通信,主从关系,MainActivty 页面布局一个EditText+Button,实现逻辑是单击按钮将信息发送给另外一个DisplayMessa ...
- vue 递归组件
如果你的项目里面的数据结构是一个树状的数据结构 然后递归组件是一个很好的一个解决你这个数据结构的一个方式 就是组件内部调用自身 tree.vue里面直接tree-node <tree-node& ...
- 全方位掌握nsis脚本
NSIS 确实是一个不错的安装程序制作软件.新版本 2.0a7 真正实现了中文支持和支持 WinXP 的安装对话框. 不过要用它实现漂亮的安装界面和完美的安装功能就必须好好的写脚本. 而 NSIS 的 ...
- 标准C++中的String类的使用
要使用标准C++中的String类,必须包含#include<string>(注意不是<string.h>带.h的是C语言中的头文件) 作者:耑新新,发布于 博客园 转载请注 ...
- hdu 5112 (2014北京现场赛 A题)
给出某个时刻对应的速度 求出相邻时刻的平均速度 输出最大值 Sample Input23 // n2 2 //t v1 13 430 31 52 0 Sample OutputCase #1: 2.0 ...
- 破损的键盘(UVa 11988)
s[] 数组用来保存原有的字符序列 nex[] 数组记录打印的下标顺序 C++11 代码如下: #include<iostream> #include<cstring> usi ...
- centos6.5/6.3升级安装ImageMagick7.0.1-1
线上论坛和应用程序的验证码功能都是使用的ImageMagick,但是版本比较老(centos yum安装的ImageMagick6.5.9).接到最新漏洞预报,紧急升级! ImageMagick图象处 ...
- Ionic Js十四:浮动框
$ionicPopover $ionicPopover 是一个可以浮在app内容上的一个视图框. 实例 HTML 代码 <p> <button ng-click="open ...
- html+css制作五环(代码极简)
五环 把五环做成一个浮动,总是位于屏幕中央的效果. 难点 定位的练习 position :fixed 位于body中间的时候 left:50%:top:50%; css内部样式表的使用 style=& ...