dubbo_异常Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException

Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meetingPubServiceImpl': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.rong.service.UserService. No provider available for the service com.rong.service.UserService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=meeting-service-consumer&dubbo=2.6.2&interface=com.rong.service.UserService&methods=selectUserById&pid=6444&register.ip=192.168.1.3&side=consumer&timestamp=1583159346943 to the consumer 192.168.1.3 use dubbo version 2.6.2
 

个人问题出现原因及解决方案:

在dubbo使用consumer调用远程服务的接口时出现了上述错误:

翻来覆去,想来想去,终于发现原来是没有开启生产者!!!!!(provider)

开启provider,再开启consumer后就一切正常了。

发布了60 篇原创文章 · 获赞 10 · 访问量 9171

猜你喜欢

转载自blog.csdn.net/chaseqrr/article/details/104621896