您的位置:首页 > 大数据 > 人工智能

Error creating bean with name 'xx': Injection of autowired dependencies failed

2015-01-29 17:45 681 查看
Error creating bean with name 'stuMgrController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could
not autowire method: public void cc.svene.controller.StuMgrController.setStuMgrService(cc.svene.service.StuMgrService);
 nested exception is org.springframework.beans.factory.CannotLoadBeanClassException:
Error loading class [org.springframework.jdbc.datasource.DataSourceTransactionManager] for bean with name 'transactionManager' defined in URL [file:/D:/Program_Files/Develop/apache-tomcat-6.0.41/webapps/ssmdemo/WEB-INF/classes/spring-mybatis.xml]: problem
with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/transaction/support/ResourceTransactionManager

解决方法:
不能注入:setStuMgrService(cc.svene.service.StuMgrService),
也就是StuMgrService没有被注入,所以要检查StuMgrService类有没有附上@Service的Service注解
或者是配置文件上的引用属性上的bean全限定类名不正确
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  spring web bean
相关文章推荐