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 2022/04/13 06:35:39 UTC

[GitHub] [dubbo] renyong666 commented on issue #9915: Dubbo3.0.7中,使用Triple协议,服务提供者应用启动之后一直NullPointerException

renyong666 commented on issue #9915:
URL: https://github.com/apache/dubbo/issues/9915#issuecomment-1097612873

   > 
   
   public static void main(String[] args) throws InterruptedException {
           ServiceConfig<HelloService> service = new ServiceConfig<>();
           service.setInterface(HelloService.class);
           service.setRef(new HelloServiceImpl());
           // 使用 Triple 协议
           service.setProtocol(new ProtocolConfig(CommonConstants.TRIPLE, 50051));
           service.setApplication(new ApplicationConfig("demo-provider"));
           // 使用 ZK 作为注册中心
           service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
           service.export();
           System.out.println("dubbo service started");
           new CountDownLatch(1).await();
       }


-- 
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