当前位置:   article > 正文

springboot--zookeeper注册_spring-cloud-zookeeper-discovery 2.2.0 配置密码

spring-cloud-zookeeper-discovery 2.2.0 配置密码

1、pom.xml 添加

  1. <dependency>
  2. <groupId>org.springframework.cloud</groupId>
  3. <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
  4. <exclusions>
  5. <exclusion>
  6. <groupId>org.springframework.cloud</groupId>
  7. <artifactId>spring-cloud-netflix-core</artifactId>
  8. </exclusion>
  9. <exclusion>
  10. <groupId>org.springframework.cloud</groupId>
  11. <artifactId>spring-cloud-starter-netflix-archaius</artifactId>
  12. </exclusion>
  13. <exclusion>
  14. <groupId>org.springframework.cloud</groupId>
  15. <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
  16. </exclusion>
  17. </exclusions>
  18. </dependency>

2、application.properties 

spring.cloud.zookeeper.connect-string=192.168.1.101:2181,192.168.1.101:2182,192.168.1.101:2183

3、XXXApplication

@EnableDiscoveryClient

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/553038
推荐阅读
相关标签
  

闽ICP备14008679号