mirror of
https://gitee.com/dromara/Raincat.git
synced 2024-11-29 18:38:55 +08:00
spring cloud hystrix.
This commit is contained in:
parent
9a9d4bfa15
commit
8b4baabcb7
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user