From 7dcb696ec4ba74d1ad117a5d2593626c6e36d2ae Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Tue, 24 Jul 2018 09:44:45 -0400 Subject: [PATCH] Use OK Http client bean instead of instance variable. Fixes #46 --- .../cloud/openfeign/FeignAutoConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java index 1caeee00..8b510e95 100644 --- a/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java +++ b/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignAutoConfiguration.java @@ -202,8 +202,8 @@ public class FeignAutoConfiguration { @Bean @ConditionalOnMissingBean(Client.class) - public Client feignClient() { - return new OkHttpClient(this.okHttpClient); + public Client feignClient(okhttp3.OkHttpClient client) { + return new OkHttpClient(client); } }