diff --git a/2.0.x/multi/multi__spring_cloud_commons_common_abstractions.html b/2.0.x/multi/multi__spring_cloud_commons_common_abstractions.html index 6bc9bf37..05055e77 100644 --- a/2.0.x/multi/multi__spring_cloud_commons_common_abstractions.html +++ b/2.0.x/multi/multi__spring_cloud_commons_common_abstractions.html @@ -1,6 +1,7 @@
-Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).
Commons provides the @EnableDiscoveryClient annotation. This looks for implementations of the DiscoveryClient interface via META-INF/spring.factories. Implementations of Discovery Client will add a configuration class to spring.factories under the org.springframework.cloud.client.discovery.EnableDiscoveryClient key. Examples of DiscoveryClient implementations: are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.
By default, implementations of DiscoveryClient will auto-register the local Spring Boot server with the remote discovery server. This can be disabled by setting autoRegister=false in @EnableDiscoveryClient.
Commons creates a Spring Boot HealthIndicator that DiscoveryClient implementations can participate in by implementing DiscoveryHealthIndicator. To disable the composite HealthIndicator set spring.cloud.discovery.client.composite-indicator.enabled=false. A generic HealthIndicator based on DiscoveryClient is auto-configured (DiscoveryClientHealthIndicator). To disable it, set `spring.cloud.discovery.client.health-indicator.enabled=false. To disable the description field of the DiscoveryClientHealthIndicator set spring.cloud.discovery.client.health-indicator.include-description=false, otherwise it can bubble up as the description of the rolled up HealthIndicator.
Commons now provides a ServiceRegistry interface which provides methods like register(Registration) and deregister(Registration) which allow you to provide custom registered services. Registration is a marker interface.
@Configuration +2. Spring Cloud Commons: Common Abstractions Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).
Commons provides the
@EnableDiscoveryClientannotation. This looks for implementations of theDiscoveryClientinterface viaMETA-INF/spring.factories. Implementations of Discovery Client will add a configuration class tospring.factoriesunder theorg.springframework.cloud.client.discovery.EnableDiscoveryClientkey. Examples ofDiscoveryClientimplementations: are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.By default, implementations of
DiscoveryClientwill auto-register the local Spring Boot server with the remote discovery server. This can be disabled by settingautoRegister=falsein@EnableDiscoveryClient.
Note The use of
@EnableDiscoveryClientis no longer required. It is enough to just have aDiscoveryClientimplementation +on the classpath to cause the Spring Boot application to register with the service discovery server.Commons creates a Spring Boot
HealthIndicatorthatDiscoveryClientimplementations can participate in by implementingDiscoveryHealthIndicator. To disable the compositeHealthIndicatorsetspring.cloud.discovery.client.composite-indicator.enabled=false. A genericHealthIndicatorbased onDiscoveryClientis auto-configured (DiscoveryClientHealthIndicator). To disable it, set `spring.cloud.discovery.client.health-indicator.enabled=false. To disable the description field of theDiscoveryClientHealthIndicatorsetspring.cloud.discovery.client.health-indicator.include-description=false, otherwise it can bubble up as thedescriptionof the rolled upHealthIndicator.Commons now provides a
ServiceRegistryinterface which provides methods likeregister(Registration)andderegister(Registration)which allow you to provide custom registered services.Registrationis a marker interface.@Configuration @EnableDiscoveryClient(autoRegister=false) public class MyConfiguration { private ServiceRegistry registry; diff --git a/2.0.x/single/spring-cloud-commons.html b/2.0.x/single/spring-cloud-commons.html index a0989cd6..48f19949 100644 --- a/2.0.x/single/spring-cloud-commons.html +++ b/2.0.x/single/spring-cloud-commons.html @@ -187,7 +187,8 @@ application context gets theEnvironment. To use th features in an application you need to include Spring Security RSA in your classpath (Maven co-ordinates "org.springframework.security:spring-security-rsa") and you also need -the full strength JCE extensions in your JVM.If you are getting an exception due to "Illegal key size" and you are using Sun’s JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. See the following links for more information:
Extract files into JDK/jre/lib/security folder (whichever version of JRE/JDK x64/x86 you are using).
For a Spring Boot Actuator application there are some additional management endpoints:
- POST to
/envto update theEnvironmentand rebind@ConfigurationPropertiesand log levels/refreshfor re-loading the boot strap context and refreshing the@RefreshScopebeans/restartfor closing theApplicationContextand restarting it (disabled by default)/pauseand/resumefor calling theLifecyclemethods (stop()andstart()on theApplicationContext)Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).
Commons provides the
@EnableDiscoveryClientannotation. This looks for implementations of theDiscoveryClientinterface viaMETA-INF/spring.factories. Implementations of Discovery Client will add a configuration class tospring.factoriesunder theorg.springframework.cloud.client.discovery.EnableDiscoveryClientkey. Examples ofDiscoveryClientimplementations: are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.By default, implementations of
DiscoveryClientwill auto-register the local Spring Boot server with the remote discovery server. This can be disabled by settingautoRegister=falsein@EnableDiscoveryClient.Commons creates a Spring Boot
HealthIndicatorthatDiscoveryClientimplementations can participate in by implementingDiscoveryHealthIndicator. To disable the compositeHealthIndicatorsetspring.cloud.discovery.client.composite-indicator.enabled=false. A genericHealthIndicatorbased onDiscoveryClientis auto-configured (DiscoveryClientHealthIndicator). To disable it, set `spring.cloud.discovery.client.health-indicator.enabled=false. To disable the description field of theDiscoveryClientHealthIndicatorsetspring.cloud.discovery.client.health-indicator.include-description=false, otherwise it can bubble up as thedescriptionof the rolled upHealthIndicator.Commons now provides a
ServiceRegistryinterface which provides methods likeregister(Registration)andderegister(Registration)which allow you to provide custom registered services.Registrationis a marker interface.@Configuration +the full strength JCE extensions in your JVM.If you are getting an exception due to "Illegal key size" and you are using Sun’s JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. See the following links for more information:
Extract files into JDK/jre/lib/security folder (whichever version of JRE/JDK x64/x86 you are using).
For a Spring Boot Actuator application there are some additional management endpoints:
- POST to
/envto update theEnvironmentand rebind@ConfigurationPropertiesand log levels/refreshfor re-loading the boot strap context and refreshing the@RefreshScopebeans/restartfor closing theApplicationContextand restarting it (disabled by default)/pauseand/resumefor calling theLifecyclemethods (stop()andstart()on theApplicationContext)Patterns such as service discovery, load balancing and circuit breakers lend themselves to a common abstraction layer that can be consumed by all Spring Cloud clients, independent of the implementation (e.g. discovery via Eureka or Consul).
Commons provides the
@EnableDiscoveryClientannotation. This looks for implementations of theDiscoveryClientinterface viaMETA-INF/spring.factories. Implementations of Discovery Client will add a configuration class tospring.factoriesunder theorg.springframework.cloud.client.discovery.EnableDiscoveryClientkey. Examples ofDiscoveryClientimplementations: are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.By default, implementations of
DiscoveryClientwill auto-register the local Spring Boot server with the remote discovery server. This can be disabled by settingautoRegister=falsein@EnableDiscoveryClient.
Note The use of
@EnableDiscoveryClientis no longer required. It is enough to just have aDiscoveryClientimplementation +on the classpath to cause the Spring Boot application to register with the service discovery server.Commons creates a Spring Boot
HealthIndicatorthatDiscoveryClientimplementations can participate in by implementingDiscoveryHealthIndicator. To disable the compositeHealthIndicatorsetspring.cloud.discovery.client.composite-indicator.enabled=false. A genericHealthIndicatorbased onDiscoveryClientis auto-configured (DiscoveryClientHealthIndicator). To disable it, set `spring.cloud.discovery.client.health-indicator.enabled=false. To disable the description field of theDiscoveryClientHealthIndicatorsetspring.cloud.discovery.client.health-indicator.include-description=false, otherwise it can bubble up as thedescriptionof the rolled upHealthIndicator.Commons now provides a
ServiceRegistryinterface which provides methods likeregister(Registration)andderegister(Registration)which allow you to provide custom registered services.Registrationis a marker interface.@Configuration @EnableDiscoveryClient(autoRegister=false) public class MyConfiguration { private ServiceRegistry registry; diff --git a/2.0.x/spring-cloud-commons.xml b/2.0.x/spring-cloud-commons.xml index 27afde7b..f42ff1fb 100644 --- a/2.0.x/spring-cloud-commons.xml +++ b/2.0.x/spring-cloud-commons.xml @@ -335,6 +335,10 @@ the full strength JCE extensions in your JVM.@EnableDiscoveryClient Commons provides the @EnableDiscoveryClient annotation. This looks for implementations of theDiscoveryClient interface viaMETA-INF/spring.factories . Implementations of Discovery Client will add a configuration class tospring.factories under theorg.springframework.cloud.client.discovery.EnableDiscoveryClient key. Examples ofDiscoveryClient implementations: are Spring Cloud Netflix Eureka, Spring Cloud Consul Discovery and Spring Cloud Zookeeper Discovery.By default, implementations of +DiscoveryClient will auto-register the local Spring Boot server with the remote discovery server. This can be disabled by settingautoRegister=false in@EnableDiscoveryClient .+ The use of +@EnableDiscoveryClient is no longer required. It is enough to just have aDiscoveryClient implementation +on the classpath to cause the Spring Boot application to register with the service discovery server.Health Indicator Commons creates a Spring Boot HealthIndicator thatDiscoveryClient implementations can participate in by implementingDiscoveryHealthIndicator . To disable the compositeHealthIndicator setspring.cloud.discovery.client.composite-indicator.enabled=false . A genericHealthIndicator based onDiscoveryClient is auto-configured (DiscoveryClientHealthIndicator). To disable it, set `spring.cloud.discovery.client.health-indicator.enabled=false . To disable the description field of theDiscoveryClientHealthIndicator setspring.cloud.discovery.client.health-indicator.include-description=false , otherwise it can bubble up as thedescription of the rolled upHealthIndicator .