Error creating bean with name 'fileController': Injection of resource dependencies failed;

1.错误描述

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘fileController‘: Injection of resource dependencies failed; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

2.问题解决

【1】网上很多的方法都是在web.xml里面增加监听器;但是原本已经有了,所以不是监听器的问题。

【2】后来发现代码中多了一行@Resource注解;删除即可解决问题。

Error creating bean with name 'fileController': Injection of resource dependencies failed;

原文地址:https://www.cnblogs.com/umblog/p/9282207.html

时间: 2024-08-03 12:39:09

Error creating bean with name 'fileController': Injection of resource dependencies failed;的相关文章

Error creating bean with name 'menuController': Injection of autowired dependency……

出现了一大串错误,Error creating bean with name 'userController': Injection of autowired dependencies failed..... 查了代码后发现,原来是在UserServiceImpl中忘了写一句话@Service("userService"),以至于因此导致一系列错误. 在控制层调用业务层,必须在业务层先进行注解:@Service("userService"): 然后在控制层注入业务层

Spring Boot报错Error creating bean with name 'userRepository': Invocation of init method failed; nested exception

问题:出现UserRePository注入创建失败,一定先检查所有的@注解是否已经标记 问题发现:entity下的实体类上面没有加注解  任何基于hibernate的实体类一定要加上@Entity注解! Spring Boot报错Error creating bean with name 'userRepository': Invocation of init method failed; nested exception 原文地址:https://www.cnblogs.com/my-prog

Error creating bean with name 'menuController': Injection of autowired dependency……

出现了一大串错误 Error creating bean with name 'userController': Injection of autowired dependencies failed..... 查了代码后发现,原来是在UserServiceImpl中忘了写一句话@Service("userService"),以至于因此导致一系列错误. 在控制层调用业务层,必须在业务层先进行注解: @Service("userService"); 然后在控制层注入业务

Error creating bean with name

今天碰到一个特别奇怪的问题: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ecfCustomerEditService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: C

Injection of autowired dependencies failed; autowire 自动注入失败,测试类已初始化过了Spring容器。

1 严重: StandardWrapper.Throwable 2 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreatio

Error creating bean with name 'com.you.user.dao.StudentDaoTest': Injection of autowired dependencies

1.错误描述 七月 13, 2014 6:37:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from class path resource [applicationContext.xml] 七月 13, 2014 6:37:42 下午 org.springframework.context.anno

Error creating bean with name 'memcachedClient'...java.lang.OutOfMemoryError

1,Tomcat启动报错如下: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memcachedClient' defined in file [/usr/local/apache-tomcat-6.0.37_6500/webapps/trade_service/WEB-INF/classes/META-INF/spring/springCont

Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://ww

Error creating bean with name &#39;sessionFactory&#39; defined in class path resource [applicationContext.xm

报错信息如下: <span style="font-size:24px;">17:18:32,245 ERROR ContextLoader:307 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resour