求解释springboot + dubbo 中的 spring.dubbo.registry.address 这个配置为什么多台需要backup - OSCHINA - 回答人是我自己 记录一下

zookeeper集群注册中心正确配置应该是

spring.dubbo.registry.address=zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183

或者

spring.dubbo.registry.protocol=zookeeper
spring.dubbo.registry.address=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183

同理,当这样用


    <parent>
        <groupId>cn.superdesk.uniorder.websocket</groupId>
        <artifactId>superdesk-uniorder-websocket</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    
    <dubbo.version>2.6.5</dubbo.version>
        <!-- Dubbo Spring Boot Starter -->
        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>0.2.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
            <version>${dubbo.version}</version>
        </dependency>
dubbo.registry.address=zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183
dubbo.registry.protocol=zookeeper
dubbo.registry.address=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183

原网址: 访问
创建于: 2021-02-21 11:07:56
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论