From 8ecd23b6493c671c1008c8797e0a92a76c26941b Mon Sep 17 00:00:00 2001
From: buildmaster Spring Cloud Netflix provides the following beans by default for feign ( The OkHttpClient and ApacheHttpClient feign clients can be used by setting Spring Cloud Netflix 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: Creating a bean of one of those type and placing it in a BeanType beanName: ClassName):Decoder feignDecoder: ResponseEntityDecoder (which wraps a SpringDecoder)Encoder feignEncoder: SpringEncoderLogger feignLogger: Slf4jLoggerContract feignContract: SpringMvcContractFeign.Builder feignBuilder: HystrixFeign.BuilderClient feignClient: if Ribbon is enabled it is a LoadBalancerFeignClient, otherwise the default feign client is used.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 ClosableHttpClient when using Apache or OkHttpClient whe using OK HTTP.Logger.LevelRetryerErrorDecoderRequest.OptionsCollection<RequestInterceptor>SetterFactory@FeignClient configuration (such as FooConfiguration above) allows you to override each one of the beans described. Example:@Configuration
+You can customize the HTTP client used by providing a bean of either
ClosableHttpClient when using Apache or OkHttpClient when using OK HTTP.
Spring Cloud Netflix 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:
Logger.LevelRetryerErrorDecoderRequest.OptionsCollection<RequestInterceptor>SetterFactoryCreating a bean of one of those type and placing it in a @FeignClient configuration (such as FooConfiguration above) allows you to override each one of the beans described. Example:
@Configuration public class FooConfiguration { @Bean public Contract feignContract() { diff --git a/single/spring-cloud-openfeign.html b/single/spring-cloud-openfeign.html index ab902387..2198555a 100644 --- a/single/spring-cloud-openfeign.html +++ b/single/spring-cloud-openfeign.html @@ -40,7 +40,7 @@ in your external configuration (see public interface StoreClient { //.. }
Spring Cloud Netflix provides the following beans by default for feign (BeanType beanName: ClassName):
Decoder feignDecoder: ResponseEntityDecoder (which wraps a SpringDecoder)Encoder feignEncoder: SpringEncoderLogger feignLogger: Slf4jLoggerContract feignContract: SpringMvcContractFeign.Builder feignBuilder: HystrixFeign.BuilderClient feignClient: if Ribbon is enabled it is a LoadBalancerFeignClient, otherwise the default feign client is used.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 ClosableHttpClient when using Apache or OkHttpClient whe using OK HTTP.
Spring Cloud Netflix 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:
Logger.LevelRetryerErrorDecoderRequest.OptionsCollection<RequestInterceptor>SetterFactoryCreating a bean of one of those type and placing it in a @FeignClient configuration (such as FooConfiguration above) allows you to override each one of the beans described. Example:
@Configuration +You can customize the HTTP client used by providing a bean of eitherClosableHttpClientwhen using Apache orOkHttpClientwhen using OK HTTP.Spring Cloud Netflix 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:
Logger.LevelRetryerErrorDecoderRequest.OptionsCollection<RequestInterceptor>SetterFactoryCreating a bean of one of those type and placing it in a
@FeignClientconfiguration (such asFooConfigurationabove) allows you to override each one of the beans described. Example:@Configuration public class FooConfiguration { @Bean public Contract feignContract() { diff --git a/spring-cloud-openfeign.xml b/spring-cloud-openfeign.xml index 83fb3089..3b847b35 100644 --- a/spring-cloud-openfeign.xml +++ b/spring-cloud-openfeign.xml @@ -104,7 +104,7 @@ public interface StoreClient {The OkHttpClient and ApacheHttpClient feign clients can be used by setting +You can customize the HTTP client used by providing a bean of eitherfeign.okhttp.enabled orfeign.httpclient.enabled totrue , respectively, and having them on the classpath. -You can customize the HTTP client used by providing a bean of eitherClosableHttpClient when using Apache orOkHttpClient whe using OK HTTP.ClosableHttpClient when using Apache orOkHttpClient when using OK HTTP.Spring Cloud Netflix 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: