SSM 整合发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies fail
来源:互联网 发布:discuz数据调用 编辑:程序博客网 时间:2024/05/17 05:57
运行SSM工程发生异常:
Error creating bean with name 'itemsController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.hlx.service.ItemsService] found for dependency:expected at least 1 bean which qualifies as autowire candidate for this dependency.Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
原因:web.xml文件在加载配置文件时,没有写classpath:
解决:
<!--1) 加载spring容器 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext-*.xml</param-value> </context-param>
阅读全文
0 0
- SSM 整合发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies fail
- spring问题:Error creating bean with name 'articleController': Injection of autowired dependencies fail
- Error creating bean with name 'contentTypeAdminController': Injection of autowired dependencies fail
- Error creating bean with name 'controller':Injection of resource dependencies failed
- Error creating bean with name 'controller':Injection of resource dependencies failed
- Error creating bean with name 'sysUserController': Injection of resource dependencies failed; nested
- Error creating bean with name 'itemController': Injection of resource dependencies failed; nested ex
- Error creating bean with name 'userController': Injection of resource dependencies failed;
- Spring MVC 配置报错: Error creating bean with name 'userController': Injection of resource dependencies
- Error creating bean with name '****': Injection of autowired dependencies failed
- bean依赖注入错误:Error creating bean with name 'itemService': Injection of autowired dependencies failed
- eclips maven项目ssm框架整合后运行报错Error creating bean with name 'itemServiceImpl': Injection of autowir
- Error creating bean with name 'com.you.user.dao.StudentDaoTest': Injection of autowired dependencies
- Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;
- Error creating bean with name 'xx': Injection of autowired dependencies failed
- Error creating bean with name 'xxxx': Injection of autowired dependencies failed;
- Error creating bean with name 'empresasDAO': Injection of autowired dependencies failed up vote 0
- jboss服务启动时报Error creating bean with name'addressService': Injection of autowired dependencies faile
- 白名单和黑名单概念
- 基于Java Bouncy Castle的PGP加密解密示例
- Python格式化字符串
- HDU
- 二叉树的深度
- SSM 整合发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies fail
- 如何使用C#自带的GDI+双缓冲类BufferedGraphics实现双缓冲功能
- 用Java实现将一个字符串中的空格换成%20
- 【PAT】【Advanced Level】1103. Integer Factorization (30)
- 解决方案--爬虫拿到的HTML和浏览器中的源码不相同
- 测试的简单基本流程
- SQL insert 语句
- Error:Failed to complete Gradle execution.
- 云上建站快速入门:博客、论坛、CMS、电子商务网站统统搞定