From e6d5a1e3eb20ea439e6bcc0c62ce50aeeebdbe5f Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 4 Jun 2018 18:12:22 +0000 Subject: [PATCH] Sync docs from 1.3.x to gh-pages --- ...__spring_cloud_commons_common_abstractions.html | 4 +++- 1.3.x/single/spring-cloud-commons.html | 4 +++- 1.3.x/spring-cloud-commons.xml | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/1.3.x/multi/multi__spring_cloud_commons_common_abstractions.html b/1.3.x/multi/multi__spring_cloud_commons_common_abstractions.html index 5adab984..250759bc 100644 --- a/1.3.x/multi/multi__spring_cloud_commons_common_abstractions.html +++ b/1.3.x/multi/multi__spring_cloud_commons_common_abstractions.html @@ -15,7 +15,9 @@ on the classpath to cause the Spring Boot application to register with the servi Registration registration = constructRegistration(); this.registry.register(registration); } -}

Each ServiceRegistry implementation has its own Registry implementation.

2.2.1 ServiceRegistry Auto-Registration

By default, the ServiceRegistry implementation will auto-register the running service. To disable that behavior, there are two methods. You can set @EnableDiscoveryClient(autoRegister=false) to permanently disable auto-registration. You can also set spring.cloud.service-registry.auto-registration.enabled=false to disable the behavior via configuration.

2.2.2 Service Registry Actuator Endpoint

A /service-registry actuator endpoint is provided by Commons. This endpoint relys on a Registration bean in the Spring Application Context. Calling /service-registry/instance-status via a GET will return the status of the Registration. A POST to the same endpoint with a String body will change the status of the current Registration to the new value. Please see the documentation of the ServiceRegistry implementation you are using for the allowed values for updating the status and the values retured for the status.

2.3 Spring RestTemplate as a Load Balancer Client

RestTemplate can be automatically configured to use ribbon. To create a load balanced RestTemplate create a RestTemplate @Bean and use the @LoadBalanced qualifier.

[Warning]Warning

A RestTemplate bean is no longer created via auto configuration. It must be created by individual applications.

@Configuration
+}

Each ServiceRegistry implementation has its own Registry implementation.

  • ZookeeperRegistration used with ZookeeperServiceRegistry
  • EurekaRegistration used with EurekaServiceRegistry
  • ConsulRegistration used with ConsulServiceRegistry

If you are using the ServiceRegistry interface, you are going to need to pass the +correct Registry implementation for the ServiceRegistry implementation you +are using.

2.2.1 ServiceRegistry Auto-Registration

By default, the ServiceRegistry implementation will auto-register the running service. To disable that behavior, there are two methods. You can set @EnableDiscoveryClient(autoRegister=false) to permanently disable auto-registration. You can also set spring.cloud.service-registry.auto-registration.enabled=false to disable the behavior via configuration.

2.2.2 Service Registry Actuator Endpoint

A /service-registry actuator endpoint is provided by Commons. This endpoint relys on a Registration bean in the Spring Application Context. Calling /service-registry/instance-status via a GET will return the status of the Registration. A POST to the same endpoint with a String body will change the status of the current Registration to the new value. Please see the documentation of the ServiceRegistry implementation you are using for the allowed values for updating the status and the values retured for the status.

2.3 Spring RestTemplate as a Load Balancer Client

RestTemplate can be automatically configured to use ribbon. To create a load balanced RestTemplate create a RestTemplate @Bean and use the @LoadBalanced qualifier.

[Warning]Warning

A RestTemplate bean is no longer created via auto configuration. It must be created by individual applications.

@Configuration
 public class MyConfiguration {
 
     @LoadBalanced
diff --git a/1.3.x/single/spring-cloud-commons.html b/1.3.x/single/spring-cloud-commons.html
index 42d8fb95..2c452d92 100644
--- a/1.3.x/single/spring-cloud-commons.html
+++ b/1.3.x/single/spring-cloud-commons.html
@@ -202,7 +202,9 @@ on the classpath to cause the Spring Boot application to register with the servi
         Registration registration = constructRegistration();
         this.registry.register(registration);
     }
-}

Each ServiceRegistry implementation has its own Registry implementation.

2.2.1 ServiceRegistry Auto-Registration

By default, the ServiceRegistry implementation will auto-register the running service. To disable that behavior, there are two methods. You can set @EnableDiscoveryClient(autoRegister=false) to permanently disable auto-registration. You can also set spring.cloud.service-registry.auto-registration.enabled=false to disable the behavior via configuration.

2.2.2 Service Registry Actuator Endpoint

A /service-registry actuator endpoint is provided by Commons. This endpoint relys on a Registration bean in the Spring Application Context. Calling /service-registry/instance-status via a GET will return the status of the Registration. A POST to the same endpoint with a String body will change the status of the current Registration to the new value. Please see the documentation of the ServiceRegistry implementation you are using for the allowed values for updating the status and the values retured for the status.

2.3 Spring RestTemplate as a Load Balancer Client

RestTemplate can be automatically configured to use ribbon. To create a load balanced RestTemplate create a RestTemplate @Bean and use the @LoadBalanced qualifier.

[Warning]Warning

A RestTemplate bean is no longer created via auto configuration. It must be created by individual applications.

@Configuration
+}

Each ServiceRegistry implementation has its own Registry implementation.

  • ZookeeperRegistration used with ZookeeperServiceRegistry
  • EurekaRegistration used with EurekaServiceRegistry
  • ConsulRegistration used with ConsulServiceRegistry

If you are using the ServiceRegistry interface, you are going to need to pass the +correct Registry implementation for the ServiceRegistry implementation you +are using.

2.2.1 ServiceRegistry Auto-Registration

By default, the ServiceRegistry implementation will auto-register the running service. To disable that behavior, there are two methods. You can set @EnableDiscoveryClient(autoRegister=false) to permanently disable auto-registration. You can also set spring.cloud.service-registry.auto-registration.enabled=false to disable the behavior via configuration.

2.2.2 Service Registry Actuator Endpoint

A /service-registry actuator endpoint is provided by Commons. This endpoint relys on a Registration bean in the Spring Application Context. Calling /service-registry/instance-status via a GET will return the status of the Registration. A POST to the same endpoint with a String body will change the status of the current Registration to the new value. Please see the documentation of the ServiceRegistry implementation you are using for the allowed values for updating the status and the values retured for the status.

2.3 Spring RestTemplate as a Load Balancer Client

RestTemplate can be automatically configured to use ribbon. To create a load balanced RestTemplate create a RestTemplate @Bean and use the @LoadBalanced qualifier.

[Warning]Warning

A RestTemplate bean is no longer created via auto configuration. It must be created by individual applications.

@Configuration
 public class MyConfiguration {
 
     @LoadBalanced
diff --git a/1.3.x/spring-cloud-commons.xml b/1.3.x/spring-cloud-commons.xml
index ee37d002..2b66dab9 100644
--- a/1.3.x/spring-cloud-commons.xml
+++ b/1.3.x/spring-cloud-commons.xml
@@ -363,6 +363,20 @@ public class MyConfiguration {
     }
 }
 Each ServiceRegistry implementation has its own Registry implementation.
+
+
+ZookeeperRegistration used with ZookeeperServiceRegistry
+
+
+EurekaRegistration used with EurekaServiceRegistry
+
+
+ConsulRegistration used with ConsulServiceRegistry
+
+
+If you are using the ServiceRegistry interface, you are going to need to pass the
+correct Registry implementation for the ServiceRegistry implementation you
+are using.
 
ServiceRegistry Auto-Registration By default, the ServiceRegistry implementation will auto-register the running service. To disable that behavior, there are two methods. You can set @EnableDiscoveryClient(autoRegister=false) to permanently disable auto-registration. You can also set spring.cloud.service-registry.auto-registration.enabled=false to disable the behavior via configuration.