diff --git a/multi/multi_pr01.html b/multi/multi_pr01.html index abf6918c..517e6de6 100644 --- a/multi/multi_pr01.html +++ b/multi/multi_pr01.html @@ -1,6 +1,6 @@ -

This project provides Zookeeper integrations for Spring Boot applications through +

This project provides Zookeeper integrations for Spring Boot applications through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few annotations, you can quickly enable and configure the common patterns inside your application and build large distributed systems with Zookeeper based diff --git a/multi/multi_spring-cloud-zookeeper-config.html b/multi/multi_spring-cloud-zookeeper-config.html index a9a566ad..5a3d4e82 100644 --- a/multi/multi_spring-cloud-zookeeper-config.html +++ b/multi/multi_spring-cloud-zookeeper-config.html @@ -1,11 +1,11 @@ - 7. Distributed Configuration with Zookeeper

7. Distributed Configuration with Zookeeper

Zookeeper provides a + 7. Distributed Configuration with Zookeeper

7. Distributed Configuration with Zookeeper

Zookeeper provides a hierarchical namespace that lets clients store arbitrary data, such as configuration data. Spring Cloud Zookeeper Config is an alternative to the Config Server and Client. -Configuration is loaded into the Spring Environment during the special “bootstrap” +Configuration is loaded into the Spring Environment during the special bootstrap phase. Configuration is stored in the /config namespace by default. Multiple PropertySource instances are created, based on the application’s name and the active profiles, to mimic the Spring Cloud Config order of resolving properties. For example, an diff --git a/multi/multi_spring-cloud-zookeeper-dependencies.html b/multi/multi_spring-cloud-zookeeper-dependencies.html index 69b03665..77624b88 100644 --- a/multi/multi_spring-cloud-zookeeper-dependencies.html +++ b/multi/multi_spring-cloud-zookeeper-dependencies.html @@ -1,6 +1,6 @@ - 5. Zookeeper Dependencies

5. Zookeeper Dependencies

The following topics cover how to work with Spring Cloud Zookeeper dependencies:

5.1 Using the Zookeeper Dependencies

Spring Cloud Zookeeper gives you a possibility to provide dependencies of your application + 5. Zookeeper Dependencies

5. Zookeeper Dependencies

The following topics cover how to work with Spring Cloud Zookeeper dependencies:

5.1 Using the Zookeeper Dependencies

Spring Cloud Zookeeper gives you a possibility to provide dependencies of your application as properties. As dependencies, you can understand other applications that are registered in Zookeeper and which you would like to call through Feign @@ -47,7 +47,7 @@ dependency is registered under Zookeeper. As described in the operates on URLs. As a result, this path is not compliant with its requirement. That is why Spring Cloud Zookeeper maps the alias to the proper path.

5.3.3 Load Balancer Type

The load balancer type is represented by loadBalancerType YAML property.

If you know what kind of load-balancing strategy has to be applied when calling this particular dependency, you can provide it in the YAML file, and it is automatically -applied. You can choose one of the following load balancing strategies:

  • STICKY: Once chosen, the instance is always called.
  • RANDOM: Picks an instance randomly.
  • ROUND_ROBIN: Iterates over instances over and over again.

5.3.4 Content-Type Template and Version

The Content-Type template and version are represented by the contentTypeTemplate and +applied. You can choose one of the following load balancing strategies:

  • STICKY: Once chosen, the instance is always called.
  • RANDOM: Picks an instance randomly.
  • ROUND_ROBIN: Iterates over instances over and over again.

5.3.4 Content-Type Template and Version

The Content-Type template and version are represented by the contentTypeTemplate and version YAML properties.

If you version your API in the Content-Type header, you do not want to add this header to each of your requests. Also, if you want to call a new version of the API, you do not want to roam around your code to bump up the API version. That is why you can provide a diff --git a/multi/multi_spring-cloud-zookeeper-dependency-watcher.html b/multi/multi_spring-cloud-zookeeper-dependency-watcher.html index 534a0659..baeb7889 100644 --- a/multi/multi_spring-cloud-zookeeper-dependency-watcher.html +++ b/multi/multi_spring-cloud-zookeeper-dependency-watcher.html @@ -1,6 +1,6 @@ - 6. Spring Cloud Zookeeper Dependency Watcher

6. Spring Cloud Zookeeper Dependency Watcher

The Dependency Watcher mechanism lets you register listeners to your dependencies. The + 6. Spring Cloud Zookeeper Dependency Watcher

6. Spring Cloud Zookeeper Dependency Watcher

The Dependency Watcher mechanism lets you register listeners to your dependencies. The functionality is, in fact, an implementation of the Observator pattern. When a dependency changes, its state (to either UP or DOWN), some custom logic can be applied.

6.1 Activating

Spring Cloud Zookeeper Dependencies functionality needs to be enabled for you to use the Dependency Watcher mechanism.

6.2 Registering a Listener

To register a listener, you must implement an interface called diff --git a/multi/multi_spring-cloud-zookeeper-discovery.html b/multi/multi_spring-cloud-zookeeper-discovery.html index 470137ff..eece50de 100644 --- a/multi/multi_spring-cloud-zookeeper-discovery.html +++ b/multi/multi_spring-cloud-zookeeper-discovery.html @@ -1,6 +1,6 @@ - 2. Service Discovery with Zookeeper

2.3 Using the DiscoveryClient

Spring Cloud has support for Feign diff --git a/multi/multi_spring-cloud-zookeeper-install.html b/multi/multi_spring-cloud-zookeeper-install.html index fcb2acfc..80c56120 100644 --- a/multi/multi_spring-cloud-zookeeper-install.html +++ b/multi/multi_spring-cloud-zookeeper-install.html @@ -1,6 +1,6 @@ - 1. Install Zookeeper

1. Install Zookeeper

See the installation + 1. Install Zookeeper

1. Install Zookeeper

See the installation documentation for instructions on how to install Zookeeper.

Spring Cloud Zookeeper uses Apache Curator behind the scenes. While Zookeeper 3.5.x is still considered "beta" by the Zookeeper development team, the reality is that it is used in production by many users. diff --git a/multi/multi_spring-cloud-zookeeper-netflix.html b/multi/multi_spring-cloud-zookeeper-netflix.html index 36f5ced5..bc1ab5e4 100644 --- a/multi/multi_spring-cloud-zookeeper-netflix.html +++ b/multi/multi_spring-cloud-zookeeper-netflix.html @@ -1,6 +1,6 @@ - 3. Using Spring Cloud Zookeeper with Spring Cloud Netflix Components

3. Using Spring Cloud Zookeeper with Spring Cloud Netflix Components

Spring Cloud Netflix supplies useful tools that work regardless of which DiscoveryClient + 3. Using Spring Cloud Zookeeper with Spring Cloud Netflix Components

3. Using Spring Cloud Zookeeper with Spring Cloud Netflix Components

Spring Cloud Netflix supplies useful tools that work regardless of which DiscoveryClient implementation you use. Feign, Turbine, Ribbon, and Zuul all work with Spring Cloud Zookeeper.

3.1 Ribbon with Zookeeper

Spring Cloud Zookeeper provides an implementation of Ribbon’s ServerList. When you use the spring-cloud-starter-zookeeper-discovery, Ribbon is autoconfigured to use the diff --git a/multi/multi_spring-cloud-zookeeper-service-registry.html b/multi/multi_spring-cloud-zookeeper-service-registry.html index fa41bdc5..026f54df 100644 --- a/multi/multi_spring-cloud-zookeeper-service-registry.html +++ b/multi/multi_spring-cloud-zookeeper-service-registry.html @@ -1,6 +1,6 @@ - 4. Spring Cloud Zookeeper and Service Registry

4. Spring Cloud Zookeeper and Service Registry

Spring Cloud Zookeeper implements the ServiceRegistry interface, letting developers + 4. Spring Cloud Zookeeper and Service Registry

4. Spring Cloud Zookeeper and Service Registry

Spring Cloud Zookeeper implements the ServiceRegistry interface, letting developers register arbitrary services in a programmatic way.

The ServiceInstanceRegistration class offers a builder() method to create a Registration object that can be used by the ServiceRegistry, as shown in the following example:

@Autowired
diff --git a/multi/multi_spring-cloud-zookeeper.html b/multi/multi_spring-cloud-zookeeper.html
index 1a86ba6b..2e0a72f3 100644
--- a/multi/multi_spring-cloud-zookeeper.html
+++ b/multi/multi_spring-cloud-zookeeper.html
@@ -1,3 +1,3 @@
 
       
-   Spring Cloud Zookeeper
\ No newline at end of file
+   Spring Cloud Zookeeper
\ No newline at end of file
diff --git a/single/spring-cloud-zookeeper.html b/single/spring-cloud-zookeeper.html
index 7c4978d1..760523c1 100644
--- a/single/spring-cloud-zookeeper.html
+++ b/single/spring-cloud-zookeeper.html
@@ -1,6 +1,6 @@
 
       
-   Spring Cloud Zookeeper

Spring Cloud Zookeeper


This project provides Zookeeper integrations for Spring Boot applications through + Spring Cloud Zookeeper

Spring Cloud Zookeeper


This project provides Zookeeper integrations for Spring Boot applications through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few annotations, you can quickly enable and configure the common patterns inside your application and build large distributed systems with Zookeeper based @@ -76,7 +76,7 @@ provide the location of the server, as shown in the following example:

values shown in the preceding example need to be in bootstrap.yml instead of application.yml.

The default service name, instance ID, and port (taken from the Environment) are ${spring.application.name}, the Spring Context ID, and ${server.port}, respectively.

Having spring-cloud-starter-zookeeper-discovery on the classpath makes the app into both -a Zookeeper “service” (that is, it registers itself) and a “client” (that is, it can +a Zookeeper service (that is, it registers itself) and a client (that is, it can query Zookeeper to locate other services).

If you would like to disable the Zookeeper Discovery Client, you can set spring.cloud.zookeeper.discovery.enabled to false.

2.3 Using the DiscoveryClient

Spring Cloud has support for Feign @@ -167,7 +167,7 @@ dependency is registered under Zookeeper. As described in the operates on URLs. As a result, this path is not compliant with its requirement. That is why Spring Cloud Zookeeper maps the alias to the proper path.

5.3.3 Load Balancer Type

The load balancer type is represented by loadBalancerType YAML property.

If you know what kind of load-balancing strategy has to be applied when calling this particular dependency, you can provide it in the YAML file, and it is automatically -applied. You can choose one of the following load balancing strategies:

  • STICKY: Once chosen, the instance is always called.
  • RANDOM: Picks an instance randomly.
  • ROUND_ROBIN: Iterates over instances over and over again.

5.3.4 Content-Type Template and Version

The Content-Type template and version are represented by the contentTypeTemplate and +applied. You can choose one of the following load balancing strategies:

  • STICKY: Once chosen, the instance is always called.
  • RANDOM: Picks an instance randomly.
  • ROUND_ROBIN: Iterates over instances over and over again.

5.3.4 Content-Type Template and Version

The Content-Type template and version are represented by the contentTypeTemplate and version YAML properties.

If you version your API in the Content-Type header, you do not want to add this header to each of your requests. Also, if you want to call a new version of the API, you do not want to roam around your code to bump up the API version. That is why you can provide a @@ -226,7 +226,7 @@ overridden.