You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/16 09:30:56 UTC

[GitHub] [dubbo] kevinw66 commented on issue #8306: how to refer dubbo service in unit test

kevinw66 commented on issue #8306:
URL: https://github.com/apache/dubbo/issues/8306#issuecomment-881310906


   Try this
   ```
   ReferenceConfig<DemoService> reference = new ReferenceConfig<>();
   reference.setApplication(new ApplicationConfig("dubbo-demo-api-consumer"));
   reference.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
   reference.setInterface(DemoService.class);
   DemoService service = reference.get();
   String message = service.sayHello("dubbo");
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org