1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

SentinelProtectInterceptor will be the first order in InterceptorList when using @SentinelRestTemplate

This commit is contained in:
fangjian0423 2019-01-11 15:42:13 +08:00
parent 6447ae8614
commit 29a40ded8b

View File

@ -103,7 +103,7 @@ public class SentinelBeanPostProcessor implements MergedBeanDefinitionPostProces
SentinelProtectInterceptor sentinelProtectInterceptor = applicationContext
.getBean(interceptorBeanName.toString(),
SentinelProtectInterceptor.class);
restTemplate.getInterceptors().add(sentinelProtectInterceptor);
restTemplate.getInterceptors().add(0, sentinelProtectInterceptor);
}
return bean;
}