package io.jboot.test.rpc.multiregistry;


import io.jboot.app.JbootApplication;

public class DubboServerMultiDemo {

    public static void main(String[] args)  {

        //jboot端口号配置
        JbootApplication.setBootArg("undertow.port", "9002");

        // 开启 @RPCBean 自动暴露功能，默认情况下是开启的，无需配置，
        // 但是此测试代码的 jboot.properties 文件关闭了，这里需要开启下
        JbootApplication.setBootArg("jboot.rpc.autoExportEnable", true);
        JbootApplication.setBootArg("jboot.rpc.type", "dubbo");




        //两个注册中心，id 分别为 default、zk，默认情况下，如果 service 没指定注册中心，service 会向所有的注册中心发布自己的服务
        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.protocol", "nacos");
        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.address", "127.0.0.1:8848");

        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.zk.protocol", "zookeeper");
        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.zk.address", "127.0.0.1:2181");

        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.zk2.protocol", "zookeeper");
        JbootApplication.setBootArg("jboot.rpc.dubbo.registry.zk2.address", "127.0.0.1:2181");




        //dubbo 的通信协议配置，name 可以不用配置，默认值为 dubbo
        JbootApplication.setBootArg("jboot.rpc.dubbo.protocol.name", "dubbo");
        //dubbo 的通信协议配置，如果port配置为-1，则会分配一个没有被占用的端口。
        JbootApplication.setBootArg("jboot.rpc.dubbo.protocol.port", "-1");

        JbootApplication.run(args);



        System.out.println("DubboServer2NacosDemo started...");


    }
}

@@ -495,9 +495,10 @@
   //
-%E4%B8%A4
+ 3
 %E4%B8%AA%E6%B3%A8%E5%86%8C%E4%B8%AD
@@ -516,17 +516,32 @@
 fault%E3%80%81zk
-%EF%BC%8C
+%E3%80%81zk2%0A        // 
 %E9%BB%98%E8%AE%A4%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E5%A6%82%E6%9E%9C
@@ -1126,24 +1126,513 @@
 1:2181%22);%0A%0A%0A
+        //%E5%AE%9A%E4%B9%89%E4%B8%80%E4%B8%AA%E5%90%8D%E7%A7%B0%E4%B8%BA pro3 %E7%9A%84 provider%EF%BC%8C%E5%8F%AA%E6%B3%A8%E5%86%8C%E5%88%B0%E5%90%8D%E7%A7%B0%E4%B8%BA default %E7%9A%84%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83%0A//        JbootApplication.setBootArg(%22jboot.rpc.dubbo.provider.pro3.registry%22, %22default%22);%0A%0A        //%E5%AE%9A%E4%B9%89%E4%B8%80%E4%B8%AA%E5%90%8D%E7%A7%B0%E4%B8%BA pro3 %E7%9A%84 provider%EF%BC%8C%E5%8F%AA%E6%B3%A8%E5%86%8C%E5%88%B0%E5%90%8D%E7%A7%B0%E4%B8%BA zk %E7%9A%84%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83%0A        JbootApplication.setBootArg(%22jboot.rpc.dubbo.provider.pro3.registry%22, %22zk%22);%0A%0A%0A%0A        // %E8%AE%A9%E6%9C%8D%E5%8A%A1 BlogService %E4%BD%BF%E7%94%A8%E5%90%8D%E7%A7%B0%E4%B8%BA pro3 %E7%9A%84 provider%0A        // %E5%BD%93%E7%84%B6%EF%BC%8C%E6%AD%A4%E9%A1%B9%E9%85%8D%E7%BD%AE%E4%B9%9F%E5%8F%AF%E4%BB%A5%E5%9C%A8 @RPCInject %E9%87%8C%E8%BF%9B%E8%A1%8C%E9%85%8D%E7%BD%AE%0A        JbootApplication.setBootArg(%22jboot.rpc.providers%22, %22io.jboot.test.rpc.commons.BlogService:pro3%22);%0A%0A%0A%0A%0A%0A%0A
 %0A%0A        //

add dubbo-mutil-registry demos