From a4e7ee7523554625a83b4d570bc261792b38103d Mon Sep 17 00:00:00 2001 From: buildmaster Date: Mon, 26 Mar 2018 18:39:56 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- ...spring_cloud_context_application_context_services.html | 8 ++++++-- single/spring-cloud-commons.html | 8 ++++++-- spring-cloud-commons.xml | 8 +++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/multi/multi__spring_cloud_context_application_context_services.html b/multi/multi__spring_cloud_context_application_context_services.html index aeafabf3..fd5ac116 100644 --- a/multi/multi__spring_cloud_context_application_context_services.html +++ b/multi/multi__spring_cloud_context_application_context_services.html @@ -70,8 +70,12 @@ For instance, if a DataSource has open connections Then, the next time something borrows a connection from the pool, it gets one with the new URL.

Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values. To force a bean to re-initialize on the next method call, you must invalidate its cache entry.

The RefreshScope is a bean in the context and has a public refreshAll() method to refresh all beans in the scope by clearing the target cache. The /refresh endpoint exposes this functionality (over HTTP or JMX). -To refresh an individual bean by name, there is also a refresh(String) method.

[Note]Note

@RefreshScope works (technically) on an @Configuration class, but it might lead to surprising behavior. -For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. +To refresh an individual bean by name, there is also a refresh(String) method.

To expose the /refresh endpoint, you need to add following configuration to your application:

management:
+  endpoints:
+    web:
+      exposure:
+        include: refresh
[Note]Note

@RefreshScope works (technically) on an @Configuration class, but it might lead to surprising behavior. +For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. Specifically, anything that depends on those beans cannot rely on them being updated when a refresh is initiated, unless it is itself in @RefreshScope. In that case, it is rebuilt on a refresh and its dependencies are re-injected. At that point, they are re-initialized from the refreshed @Configuration).

1.9 Encryption and Decryption

Spring Cloud has an Environment pre-processor for decrypting property values locally. It follows the same rules as the Config Server and has the same external configuration through encrypt.*. diff --git a/single/spring-cloud-commons.html b/single/spring-cloud-commons.html index 70da86a1..7cf12dee 100644 --- a/single/spring-cloud-commons.html +++ b/single/spring-cloud-commons.html @@ -76,8 +76,12 @@ For instance, if a DataSource has open connections Then, the next time something borrows a connection from the pool, it gets one with the new URL.

Refresh scope beans are lazy proxies that initialize when they are used (that is, when a method is called), and the scope acts as a cache of initialized values. To force a bean to re-initialize on the next method call, you must invalidate its cache entry.

The RefreshScope is a bean in the context and has a public refreshAll() method to refresh all beans in the scope by clearing the target cache. The /refresh endpoint exposes this functionality (over HTTP or JMX). -To refresh an individual bean by name, there is also a refresh(String) method.

[Note]Note

@RefreshScope works (technically) on an @Configuration class, but it might lead to surprising behavior. -For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. +To refresh an individual bean by name, there is also a refresh(String) method.

To expose the /refresh endpoint, you need to add following configuration to your application:

management:
+  endpoints:
+    web:
+      exposure:
+        include: refresh
[Note]Note

@RefreshScope works (technically) on an @Configuration class, but it might lead to surprising behavior. +For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. Specifically, anything that depends on those beans cannot rely on them being updated when a refresh is initiated, unless it is itself in @RefreshScope. In that case, it is rebuilt on a refresh and its dependencies are re-injected. At that point, they are re-initialized from the refreshed @Configuration).

1.9 Encryption and Decryption

Spring Cloud has an Environment pre-processor for decrypting property values locally. It follows the same rules as the Config Server and has the same external configuration through encrypt.*. diff --git a/spring-cloud-commons.xml b/spring-cloud-commons.xml index 7ba8f485..68a1828b 100644 --- a/spring-cloud-commons.xml +++ b/spring-cloud-commons.xml @@ -184,9 +184,15 @@ To force a bean to re-initialize on the next method call, you must invalidate it The RefreshScope is a bean in the context and has a public refreshAll() method to refresh all beans in the scope by clearing the target cache. The /refresh endpoint exposes this functionality (over HTTP or JMX). To refresh an individual bean by name, there is also a refresh(String) method. +To expose the /refresh endpoint, you need to add following configuration to your application: +management: + endpoints: + web: + exposure: + include: refresh @RefreshScope works (technically) on an @Configuration class, but it might lead to surprising behavior. -For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. +For example, it does not mean that all the @Beans defined in that class are themselves in @RefreshScope. Specifically, anything that depends on those beans cannot rely on them being updated when a refresh is initiated, unless it is itself in @RefreshScope. In that case, it is rebuilt on a refresh and its dependencies are re-injected. At that point, they are re-initialized from the refreshed @Configuration).