Skip to content

Commit 7ec374f

Browse files
committed
Document issues when using Spring FactoryBean and Spring Cloud OpenFeign Clients. Fixes gh-1009.
1 parent da680ac commit 7ec374f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/modules/ROOT/pages/spring-cloud-openfeign.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ Spring Cloud OpenFeign supports all the features available for the blocking mode
7272
TIP: To use `@EnableFeignClients` annotation on `@Configuration`-annotated-classes, make sure to specify where the clients are located, for example:
7373
`@EnableFeignClients(basePackages = "com.example.clients")`
7474
or list them explicitly:
75-
`@EnableFeignClients(clients = InventoryServiceFeignClient.class)`
75+
`@EnableFeignClients(clients = InventoryServiceFeignClient.class)`.
76+
77+
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.
7678

7779
[[attribute-resolution-mode]]
7880
==== Attribute resolution mode

0 commit comments

Comments
 (0)