You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-openfeign.adoc
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,12 +90,12 @@ TIP: For Spring Cloud Contract test integration, lazy attribute resolution shoul
90
90
[[spring-cloud-feign-overriding-defaults]]
91
91
=== Overriding Feign Defaults
92
92
93
-
A central concept in Spring Cloud's Feign support is that of the named client. Each feign client is part of an ensemble of components that work together to contact a remote server on demand, and the ensemble has a name that you give it as an application developer using the `@FeignClient` annotation. Spring Cloud creates a new ensemble as an
93
+
A central concept in Spring Cloud's Feign support is that of the named client. Each Feign client is part of an ensemble of components that work together to contact a remote server on demand, and the ensemble has a name that you give it as an application developer using the `@FeignClient` annotation. Spring Cloud creates a new ensemble as an
94
94
`ApplicationContext` on demand for each named client using `FeignClientsConfiguration`. This contains (amongst other things) an `feign.Decoder`, a `feign.Encoder`, and a `feign.Contract`.
95
95
It is possible to override the name of that ensemble by using the `contextId`
96
96
attribute of the `@FeignClient` annotation.
97
97
98
-
Spring Cloud lets you take full control of the feign client by declaring additional configuration (on top of the `FeignClientsConfiguration`) using `@FeignClient`. Example:
98
+
Spring Cloud lets you take full control of the Feign client by declaring additional configuration (on top of the `FeignClientsConfiguration`) using `@FeignClient`. Example:
99
99
100
100
[source,java,indent=0]
101
101
----
@@ -136,7 +136,7 @@ Spring Cloud OpenFeign provides the following beans by default for feign (`BeanT
* `Client` feignClient: If Spring Cloud LoadBalancer is on the classpath, `FeignBlockingLoadBalancerClient` is used.
139
-
If none of them is on the classpath, the default feign client is used.
139
+
If none of them is on the classpath, the default Feign client is used.
140
140
141
141
NOTE: `spring-cloud-starter-openfeign` supports `spring-cloud-starter-loadbalancer`. However, as is an optional dependency, you need to make sure it has been added to your project if you want to use it.
142
142
@@ -150,7 +150,7 @@ If you can not configure Apache HttpClient 5 by using properties, there is an `H
150
150
151
151
TIP: Starting with Spring Cloud OpenFeign 4, the Feign Apache HttpClient 4 is no longer supported. We suggest using Apache HttpClient 5 instead.
152
152
153
-
Spring Cloud OpenFeign _does not_ provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:
153
+
Spring Cloud OpenFeign _does not_ provide the following beans by default for feign, but still looks up beans of these types from the application context to create the Feign client:
154
154
155
155
* `Logger.Level`
156
156
* `Retryer`
@@ -223,7 +223,7 @@ spring:
223
223
`feignName` in this example refers to `@FeignClient` `value`, that is also aliased with `@FeignClient` `name` and `@FeignClient` `contextId`. In a load-balanced scenario, it also corresponds to the `serviceId` of the server app that will be used to retrieve the instances. The specified classes for decoders, retryer and other ones must have a bean in the Spring context or have a default constructor.
224
224
225
225
226
-
Default configurations can be specified in the `@EnableFeignClients` attribute `defaultConfiguration` in a similar manner as described above. The difference is that this configuration will apply to _all_ feign clients.
226
+
Default configurations can be specified in the `@EnableFeignClients` attribute `defaultConfiguration` in a similar manner as described above. The difference is that this configuration will apply to _all_ Feign clients.
227
227
228
228
If you prefer using configuration properties to configure all `@FeignClient`, you can create configuration properties with `default` feign name.
229
229
@@ -247,7 +247,7 @@ If we create both `@Configuration` bean and configuration properties, configurat
247
247
It will override `@Configuration` values. But if you want to change the priority to `@Configuration`,
248
248
you can change `spring.cloud.openfeign.client.default-to-properties` to `false`.
249
249
250
-
If we want to create multiple feign clients with the same name or url
250
+
If we want to create multiple Feign clients with the same name or url
251
251
so that they would point to the same server but each with a different custom configuration then
252
252
we have to use `contextId` attribute of the `@FeignClient` in order to avoid name
253
253
collision of these configuration beans.
@@ -763,7 +763,7 @@ public class Params {
763
763
}
764
764
----
765
765
766
-
The following feign client uses the `Params` class by using the `@SpringQueryMap` annotation:
766
+
The following Feign client uses the `Params` class by using the `@SpringQueryMap` annotation:
0 commit comments