Springboot - Zookeeper配置
2021-04-30 13:27
标签:inf cti 文件 ons instance gis apach frame pid Springboot 版本 2.0.3.RELEASE github : https://github.com/szjomin/SpringBootZookeeperConfig 一、java pom 文件 - properties pom 文件 - denpendenies pom 文件 - dependencyManagement 2、注解 在application上注解 3、配置文件 二、启动zookeeper 服务 【 附:使用 zkui 实现 zookeeper 可视化 :https://www.cnblogs.com/zhangchengzi/p/10907595.html 】 Springboot - Zookeeper配置 标签:inf cti 文件 ons instance gis apach frame pid 原文地址:https://www.cnblogs.com/Jomini/p/13228694.htmlspring-cloud.version>Finchley.RELEASEspring-cloud.version>
dependency>
groupId>org.springframework.cloudgroupId>
artifactId>spring-cloud-starter-zookeeper-discoveryartifactId>
dependency>
dependency>
groupId>org.apache.zookeepergroupId>
artifactId>zookeeperartifactId>
version>3.4.13version>
exclusions>
exclusion>
groupId>org.slf4jgroupId>
artifactId>slf4j-log4j12artifactId>
exclusion>
exclusions>
dependency>
dependency>
groupId>com.101tecgroupId>
artifactId>zkclientartifactId>
version>0.10version>
exclusions>
exclusion>
artifactId>slf4j-apiartifactId>
groupId>org.slf4jgroupId>
exclusion>
exclusion>
artifactId>log4jartifactId>
groupId>log4jgroupId>
exclusion>
exclusion>
artifactId>slf4j-log4j12artifactId>
groupId>org.slf4jgroupId>
exclusion>
exclusions>
dependency>
dependencies>
dependency>
groupId>org.springframework.cloudgroupId>
artifactId>spring-cloud-dependenciesartifactId>
version>${spring-cloud.version}version>
type>pomtype>
scope>importscope>
dependency>
dependencies>
@EnableDiscoveryClient
cloud:
zookeeper:
connect-string: 127.0.0.1:2181
discovery:
register: true
enable: true
instance-id: 1
root: /
上一篇:LeetCode-108.将有序数组转换为二叉搜索树
下一篇:java.lang.IllegalStateException: The platform metadata area could not be written
文章标题:Springboot - Zookeeper配置
文章链接:http://soscw.com/index.php/essay/80411.html