dubbo服务报错service注册不上

dubbo服务报错service注册不上

一开始一直疑惑 为什么一模一样的代码 别人正常 我的代码就是运行不了,启动报错。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userController’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘EDoctorUserService’: FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.app.service.edoctor.EDoctorUserService. No provider available for the service com.app.service.edoctor.EDoctorUserService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.

报错信息 就是说service注册不上。试了网上的各种方法:
1.IP地址是否占用
2.service名称是否正确
3.zookper版本不正确

最后还是不对,同事推荐用dubbo控制台在这里插入图片描述
控制台显示,28个服务,只有3个注册上了 为什么呢!

纠结了半天,最后发现是扫描包的问题,service 没扫描上。
在spring-mybatis.xml文件中加了
<context:component-scan base-package=“com.app.service” scoped-proxy=“interfaces”></context:component-scan>
这句话,发现就好了。
可是为什么同事没有这行代码 运行正常呢 还是很奇怪
我还是要好好研究dubbo

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值