diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index b07587c4..db640883 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -183,6 +183,10 @@ 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`. +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.