spring dubbo 配置,项目中连接多个注册中心

阅读更多

 

如果项目需要连接多个ZooKeeper,则定义多个dubbo:registry,对应的dubbo:reference与dubbo:service指定的注册中心registry="registry1"。

   

 




    

   
    

    
    
    
    
    
    

    

    
    
    
    
    
    

 

     

system.dubbo.application = ${system.dubbo.application}
system.dubbo.registry1= ${system.dubbo.registry1}
system.dubbo.registry2= ${system.dubbo.registry2}

dubbo.reference.check = false

 

 配置文件中的${},请看  maven多环境配置打包

 

system.dubbo.application = ***_dev_service
system.dubbo.registry1= zookeeper://192.168.0.81:2181
system.dubbo.registry2= zookeeper://192.168.0.82:2181

 

你可能感兴趣的:(dubbo,zookeeper)