[英]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. 我正在尝试在一个应用程序中使用ZooKeeper服务发现和Spring云配置,但是找不到正确的依赖项。
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. 转到http://start.spring.io/并选择Spring Cloud Config和Spring Cloud Zookeeper。 All the dependencies will be picked for you.
将为您选择所有依赖项。
Using Spring Cloud Zookeeper you will able to: 使用Spring Cloud Zookeeper,您将能够:
1) Use Zookeper for service registry & discovery 1)使用Zookeper进行服务注册和发现
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
</dependency>
2) Use Zookeper for distrubuted configuration 2)使用Zookeper进行分布式配置
<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). 为此,您不必使用Spring Cloud Config(基于Spring Cloud Server和Git存储库的实现)。
Are you trying to use also Spring CLoud Config for other needs or requirements? 您是否还在尝试将Spring CLoud Config用于其他需求或要求?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.