From 7ec374f6a19a69186281e2bce16ca2f2a9566f13 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Wed, 3 Jul 2024 14:40:40 +0200 Subject: [PATCH] Document issues when using Spring FactoryBean and Spring Cloud OpenFeign Clients. Fixes gh-1009. --- docs/modules/ROOT/pages/spring-cloud-openfeign.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc index 097c30494..5533f4425 100644 --- a/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-openfeign.adoc @@ -72,7 +72,9 @@ Spring Cloud OpenFeign supports all the features available for the blocking mode TIP: To use `@EnableFeignClients` annotation on `@Configuration`-annotated-classes, make sure to specify where the clients are located, for example: `@EnableFeignClients(basePackages = "com.example.clients")` or list them explicitly: -`@EnableFeignClients(clients = InventoryServiceFeignClient.class)` +`@EnableFeignClients(clients = InventoryServiceFeignClient.class)`. + +WARNING: Since `FactoryBean` objects may be instantiated before the initial context refresh should take place, and the instantiation of Spring Cloud OpenFeign Clients triggers a context refresh, they should not be declared within `FactoryBean` classes. [[attribute-resolution-mode]] ==== Attribute resolution mode