使用dubbo时报错:注入service出错BeanCreationException: Error creating bean with name。。。
来源:互联网 发布:基于内容推荐算法 编辑:程序博客网 时间:2024/06/07 11:22
使用dubbo时,新加controller和service,注解都写完,但是后台报错无法找到service注入,报错信息为:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'departmentController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.csair.test.user.service.DepartmentService] 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, lookup=, authenticationType=CONTAINER)}
这种一般是配置文件的问题,要记得在provider和consummer的xml文件中声明暴露服务和使用服务
<!-- provider --> <bean id="departmentService" class="com.csair.test.user.service.impl.DepartmentServiceImpl"/>
<!--consumer--><dubbo:reference id="departmentService" interface="com.csair.test.user.service.DepartmentService" />
阅读全文
0 0
- 使用dubbo时报错:注入service出错BeanCreationException: Error creating bean with name。。。
- dubbo注入service服务,运行加载报错:Error creating bean with name........
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- Spring ...BeanCreationException: Error creating bean with name 'sqlSessionFactoryWrite'
- BeanCreationException:Error creating bean with name 'sessionFactory' defined in file ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- java.lang.ExceptionInInitializerError BeanCreationException: Error creating bean with name 'TestServ
- BeanCreationException: Error creating bean with name 'sessionFactory' defined
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- org.springframework,beans.factory.BeanCreationException:error creating bean with name ***
- Error creating bean with name 'cn.e3mall.sso.service.RegisterService’——使用SSM框架时报的错误
- WIN10下MySQL解压版安装
- Android容器化/组件化方案
- visio2010图形组合-拆分-修剪功能
- NOIP1998提高组 进制位
- 9 月 19 日,腾讯云安全中心监测到 Apache Tomcat 修复了2个严重级别的漏洞, 分别为: 信息泄露漏洞(CVE-2017-12616)、远程代码执行漏洞(CVE-2017-12615
- 使用dubbo时报错:注入service出错BeanCreationException: Error creating bean with name。。。
- sort()函数
- 一个面试算法题
- tensorflow(GPU版)安装
- 对提升开发效率的总结
- HDU
- oracle的去重关键字distinct
- petalinux(二)开启petalinux内核调试模式
- 无分页的datatable