简体   繁体   中英

ZooKeeper with cloud config for Spring Cloud application

I'm trying to use ZooKeeper service discovery and Spring cloud config in one application, but cannot find right dependencies.

Could anyone suggest right set of dependencies for this task?

Go to http://start.spring.io/ and pick Spring Cloud Config and Spring Cloud Zookeeper. All the dependencies will be picked for you.

Using Spring Cloud Zookeeper you will able to:

1) Use Zookeper for service registry & discovery

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
    </dependency>

2) Use Zookeper for distrubuted configuration

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-zookeeper-config</artifactId>
    </dependency>

In order to do so you don't have to use Spring Cloud Config (the implementation based on Spring Cloud Server and a Git repository).

Are you trying to use also Spring CLoud Config for other needs or requirements?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM