mirror of
https://gitee.com/dromara/Raincat.git
synced 2024-12-02 03:48:35 +08:00
spring cloud hystrix.
This commit is contained in:
parent
9a9d4bfa15
commit
8b4baabcb7
@ -18,22 +18,21 @@
|
|||||||
|
|
||||||
package org.dromara.raincat.springcloud.feign;
|
package org.dromara.raincat.springcloud.feign;
|
||||||
|
|
||||||
import feign.Feign;
|
import feign.RequestInterceptor;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RestTemplateConfiguration.
|
* RestTemplateConfiguration.
|
||||||
|
*
|
||||||
* @author xiaoyu
|
* @author xiaoyu
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class RestTemplateConfiguration {
|
public class RestTemplateConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Scope("prototype")
|
public RequestInterceptor requestInterceptor() {
|
||||||
public Feign.Builder feignBuilder() {
|
return new RestTemplateInterceptor();
|
||||||
return Feign.builder().requestInterceptor(new RestTemplateInterceptor());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user