diff --git a/multi/multi__spring_cloud_context_application_context_services.html b/multi/multi__spring_cloud_context_application_context_services.html index e28106df..3d186bd0 100644 --- a/multi/multi__spring_cloud_context_application_context_services.html +++ b/multi/multi__spring_cloud_context_application_context_services.html @@ -74,7 +74,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi annotation on some beans which can be only initialized once. If a bean is "immutable", you will have to either annotate the bean with @RefreshScope or specify the classname under the property key -spring.cloud.refresh.extra-refreshable.

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. +spring.cloud.refresh.extra-refreshable.

[Important]Important

If you create a DataSource bean yourself and the implementation is a HikariDataSource, return the +most specific type, in this case HikariDataSource. Otherwise, you will need to set +spring.cloud.refresh.extra-refreshable=javax.sql.DataSource.

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.

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

management:
diff --git a/single/spring-cloud-commons.html b/single/spring-cloud-commons.html
index 04a75d24..8fec4227 100644
--- a/single/spring-cloud-commons.html
+++ b/single/spring-cloud-commons.html
@@ -80,7 +80,9 @@ Then, the next time something borrows a connection from the pool, it gets one wi
 annotation on some beans which can be only initialized once. If a bean
 is "immutable", you will have to either annotate the bean with @RefreshScope
 or specify the classname under the property key
-spring.cloud.refresh.extra-refreshable.

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. +spring.cloud.refresh.extra-refreshable.

[Important]Important

If you create a DataSource bean yourself and the implementation is a HikariDataSource, return the +most specific type, in this case HikariDataSource. Otherwise, you will need to set +spring.cloud.refresh.extra-refreshable=javax.sql.DataSource.

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.

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

management:
diff --git a/spring-cloud-commons.xml b/spring-cloud-commons.xml
index 3a12bfa5..195ad30b 100644
--- a/spring-cloud-commons.xml
+++ b/spring-cloud-commons.xml
@@ -194,6 +194,11 @@ annotation on some beans which can be only initialized once. If a bean
 is "immutable", you will have to either annotate the bean with @RefreshScope
 or specify the classname under the property key
 spring.cloud.refresh.extra-refreshable.
+
+If you create a DataSource bean yourself and the implementation is a HikariDataSource, return the
+most specific type, in this case HikariDataSource. Otherwise, you will need to set
+spring.cloud.refresh.extra-refreshable=javax.sql.DataSource.
+
 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.