diff --git a/raincat-springcloud/src/main/java/org/dromara/raincat/springcloud/feign/RestTemplateConfiguration.java b/raincat-springcloud/src/main/java/org/dromara/raincat/springcloud/feign/RestTemplateConfiguration.java index 44b777e..29c8175 100644 --- a/raincat-springcloud/src/main/java/org/dromara/raincat/springcloud/feign/RestTemplateConfiguration.java +++ b/raincat-springcloud/src/main/java/org/dromara/raincat/springcloud/feign/RestTemplateConfiguration.java @@ -18,22 +18,21 @@ package org.dromara.raincat.springcloud.feign; -import feign.Feign; +import feign.RequestInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; /** * RestTemplateConfiguration. + * * @author xiaoyu */ @Configuration public class RestTemplateConfiguration { @Bean - @Scope("prototype") - public Feign.Builder feignBuilder() { - return Feign.builder().requestInterceptor(new RestTemplateInterceptor()); + public RequestInterceptor requestInterceptor() { + return new RestTemplateInterceptor(); } }