From e6ce49819c2ed0919d276f0dcf4524db3561bd65 Mon Sep 17 00:00:00 2001 From: Administrator <549477611@qq.com> Date: Mon, 3 Dec 2018 17:00:03 +0800 Subject: [PATCH] spring cloud hystrix. --- .../feign/HmilyRestTemplateConfiguration.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hmily-springcloud/src/main/java/org/dromara/hmily/springcloud/feign/HmilyRestTemplateConfiguration.java b/hmily-springcloud/src/main/java/org/dromara/hmily/springcloud/feign/HmilyRestTemplateConfiguration.java index 118e1bd5..43188337 100644 --- a/hmily-springcloud/src/main/java/org/dromara/hmily/springcloud/feign/HmilyRestTemplateConfiguration.java +++ b/hmily-springcloud/src/main/java/org/dromara/hmily/springcloud/feign/HmilyRestTemplateConfiguration.java @@ -17,32 +17,32 @@ package org.dromara.hmily.springcloud.feign; -import feign.Feign; import feign.InvocationHandlerFactory; +import feign.RequestInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; /** * HmilyRestTemplateConfiguration. + * * @author xiaoyu */ @Configuration public class HmilyRestTemplateConfiguration { /** - * build feign. + * Hmily rest template interceptor request interceptor. * - * @return Feign.Builder + * @return the request interceptor */ @Bean - @Scope("prototype") - public Feign.Builder feignBuilder() { - return Feign.builder().requestInterceptor(new HmilyRestTemplateInterceptor()).invocationHandlerFactory(invocationHandlerFactory()); + public RequestInterceptor hmilyRestTemplateInterceptor() { + return new HmilyRestTemplateInterceptor(); } /** * build InvocationHandlerFactory. + * * @return InvocationHandlerFactory */ @Bean