spring cloud hystrix.

This commit is contained in:
Administrator 2018-12-03 17:01:29 +08:00
parent 9a9d4bfa15
commit 8b4baabcb7

View File

@ -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();
}
}