W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
有關(guān)如何安裝Zookeeper的說明,請參閱安裝文檔。
Spring Cloud Zookeeper在后臺使用Apache Curator。盡管Zookeeper開發(fā)團隊仍將Zookeeper 3.5.x視為“測試版”,但實際情況是,許多用戶在生產(chǎn)中使用了它。但是,Zookeeper 3.4.x也用于生產(chǎn)中。在Apache Curator 4.0之前,兩個版本的Apache Curator支持Zookeeper的兩個版本。從Curator 4.0開始,兩個Zookeeper版本都通過相同的Curator庫支持。
如果要與版本3.4集成,則需要更改curator
附帶的Zookeeper依賴項,并因此更改spring-cloud-zookeeper
。為此,只需排除該依賴性并添加如下所示的3.4.x版本。
專家。
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zookeeper-all</artifactId> <exclusions> <exclusion> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.12</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </exclusion> </exclusions> </dependency>
搖籃。
compile('org.springframework.cloud:spring-cloud-starter-zookeeper-all') { exclude group: 'org.apache.zookeeper', module: 'zookeeper' } compile('org.apache.zookeeper:zookeeper:3.4.12') { exclude group: 'org.slf4j', module: 'slf4j-log4j12' }
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: