ZooKeeper for Java/Spring Config?

前端 未结 6 853
梦毁少年i
梦毁少年i 2021-01-30 23:36

Are there any well documented use cases of Apache ZooKeeper being used to distribute configuration of Java applications, and in particular Spring services?

Like many use

6条回答
  •  攒了一身酷
    2021-01-31 00:17

    You should consider Spring Cloud Config:

    http://projects.spring.io/spring-cloud/

    Spring Cloud Config Centralized external configuration management backed by a git repository. The configuration resources map directly to Spring Environment but could be used by non-Spring applications if desired.

    Source code available here:

    https://github.com/spring-cloud/spring-cloud-config

    Sample application here:

    https://github.com/spring-cloud/spring-cloud-config/blob/master/spring-cloud-config-sample/src/main/java/sample/Application.java

提交回复
热议问题