From fa6cb9ce8279453731dbb5603ecaf8a22b52a2bf Mon Sep 17 00:00:00 2001
From: buildmaster HttpMessageConverters
used by default in Spring Web.
-Spring Cloud integrates Ribbon and Eureka, as well as Spring Cloud LoadBalancer to provide a load-balanced http client when using Feign.
In the @FeignClient
annotation the String value ("stores" above) is an arbitrary client name, which is used to create either a Ribbon load-balancer (see below for details of Ribbon support) or Spring Cloud LoadBalancer.
+
In the @FeignClient
annotation the String value ("stores" above) is an arbitrary client name, which is used to create a Spring Cloud LoadBalancer client.
You can also specify a URL using the url
attribute
(absolute value or just a hostname). The name of the bean in the
application context is the fully qualified name of the interface.
@@ -193,22 +193,7 @@ of the @FeignClient
annotation.
- - | -
-In order to maintain backward compatibility, is used as the default load-balancer implementation.
-However, Spring Cloud Netflix Ribbon is now in maintenance mode, so we recommend using Spring Cloud LoadBalancer instead.
-To do this, set the value of spring.cloud.loadbalancer.ribbon.enabled to false .
- |
-
Spring Cloud Netflix provides the following beans by default for feign (BeanType
beanName: ClassName
):
Spring Cloud OpenFeign provides the following beans by default for feign (BeanType
beanName: ClassName
):
Feign.Builder
feignBuilder: HystrixFeign.Builder
Client
feignClient: if Ribbon is in the classpath and is enabled it is a LoadBalancerFeignClient
, otherwise if Spring Cloud LoadBalancer is in the classpath, FeignBlockingLoadBalancerClient
is used.
+
Client
feignClient: if Spring Cloud LoadBalancer is in the classpath, FeignBlockingLoadBalancerClient
is used.
If none of them is in the classpath, the default feign client is used.
- - | -
-spring-cloud-starter-openfeign contains both spring-cloud-starter-netflix-ribbon and spring-cloud-starter-loadbalancer .
- |
-
The OkHttpClient and ApacheHttpClient feign clients can be used by setting feign.okhttp.enabled
or feign.httpclient.enabled
to true
, respectively, and having them on the classpath.
You can customize the HTTP client used by providing a bean of either org.apache.http.impl.client.CloseableHttpClient
when using Apache or okhttp3.OkHttpClient
when using OK HTTP.
HttpMessageConverters
used by default in Spring Web.
-Spring Cloud integrates Ribbon and Eureka, as well as Spring Cloud LoadBalancer to provide a load-balanced http client when using Feign.
+Spring Cloud integrates Eureka, as well as Spring Cloud LoadBalancer to provide a load-balanced http client when using Feign.
In the @FeignClient
annotation the String value ("stores" above) is an arbitrary client name, which is used to create either a Ribbon load-balancer (see below for details of Ribbon support) or Spring Cloud LoadBalancer.
+
In the @FeignClient
annotation the String value ("stores" above) is an arbitrary client name, which is used to create a Spring Cloud LoadBalancer client.
You can also specify a URL using the url
attribute
(absolute value or just a hostname). The name of the bean in the
application context is the fully qualified name of the interface.
@@ -193,22 +193,7 @@ of the @FeignClient
annotation.
- - | -
-In order to maintain backward compatibility, is used as the default load-balancer implementation.
-However, Spring Cloud Netflix Ribbon is now in maintenance mode, so we recommend using Spring Cloud LoadBalancer instead.
-To do this, set the value of spring.cloud.loadbalancer.ribbon.enabled to false .
- |
-
Spring Cloud Netflix provides the following beans by default for feign (BeanType
beanName: ClassName
):
Spring Cloud OpenFeign provides the following beans by default for feign (BeanType
beanName: ClassName
):
Feign.Builder
feignBuilder: HystrixFeign.Builder
Client
feignClient: if Ribbon is in the classpath and is enabled it is a LoadBalancerFeignClient
, otherwise if Spring Cloud LoadBalancer is in the classpath, FeignBlockingLoadBalancerClient
is used.
+
Client
feignClient: if Spring Cloud LoadBalancer is in the classpath, FeignBlockingLoadBalancerClient
is used.
If none of them is in the classpath, the default feign client is used.
- - | -
-spring-cloud-starter-openfeign contains both spring-cloud-starter-netflix-ribbon and spring-cloud-starter-loadbalancer .
- |
-
The OkHttpClient and ApacheHttpClient feign clients can be used by setting feign.okhttp.enabled
or feign.httpclient.enabled
to true
, respectively, and having them on the classpath.
You can customize the HTTP client used by providing a bean of either org.apache.http.impl.client.CloseableHttpClient
when using Apache or okhttp3.OkHttpClient
when using OK HTTP.