spring异常

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘Controller‘: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.jintong.reward.welfareunit.service.OrganService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER)}

原因:未能向‘Controller‘自动注入service,service不存在或初始化service bean失败,dao未注入成功,dao初始化失败,主意mybatis配置文件扫描包路径

时间: 2024-08-30 02:24:28

spring异常的相关文章

spring异常记录-----java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

今天在练习怎样SSH中进行单元測试的时候出现下列异常: SEVERE: Exception starting filter Struts2 java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:211

spring异常错误信息---

在练习spring项目的过程中,出现了如下异常信息: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:145) at or

Hibernate整合Spring异常&#39;sessionFactory&#39; or &#39;hibernateTemplate&#39; is required

今日在写GenericDao时,发现了一个异常,内容如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericDao' defined in class path resource [spring.common.xml]: Invocation of init method failed; nested exception is java.lang.Ille

(转)spring异常抛出触发事务回滚策略

背景:在面试时候问到事务方法在调用过程中出现异常,是否会传递的问题,平时接触的比较少,有些懵逼. spring异常抛出触发事务回滚策略 Spring.EJB的声明式事务默认情况下都是在抛出unchecked exception后才会触发事务的回滚 测试用业务逻辑方法: /** * 如果在spring事务配置中不为切入点(如这里的切入点可以定义成test*)配置事务在什么情况下回滚(格式:-引起回滚的异常类型) * 则spring默认只会在service方法抛出unchecked exceptio

Spring异常累计(1)Spring注解与扫描,NoUniqueBeanDefinitionException

spring中可以使用注解机制,代替传统的在xml中配置一个bean. 如 [java] view plain copy <pre name="code" class="java">@Component public class LoadMessageJob{ // code } 和<bean id="loadMessageJob" class="com.yicong.kisp.LoadMessageJob"

spring异常被吞的一种情形

你是否遇到过下面的情况,控制台无限的输出下面的日志: Logging initialized using 'class org.apache.ibatis.logging.log4j.Log4jImpl' adapter. Logging initialized using 'class org.apache.ibatis.logging.log4j.Log4jImpl' adapter. Logging initialized using 'class org.apache.ibatis.lo

Spring异常重试框架Spring Retry

Spring Retry支持集成到Spring或者Spring Boot项目中,而它支持AOP的切面注入写法,所以在引入时必须引入aspectjweaver.jar包. 快速集成的代码样例: @Configuration @EnableRetry public class Application { @Bean public Service service() { return new Service(); } } @Service class Service { @Retryable(Remo

spring异常-aoperror at :0 formal unbound in pointcut

练习spring的后置增强时遇到了如下问题: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemAction2' defined in class path resource [applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested excepti

【Spring异常系列】LogFactory缺失

最近刚刚学习Spring框架的应用,在使用Eclipse手动配置的时候出现了这么问题. 接着,在网上到处搜索了一些资料,在apache官网自己下载了commons-logging-1.2.jar,之后问题就解决了.

Spring异常Ambiguous mapping found.

SpringMVC启动时不停重复加载bean 通过浏览器访问获取异常:Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous