Fix: SentinelRestTemplate support custom RestTemplate (#3329) (#3344)

pull/3376/head
RuanSheng 2 years ago committed by GitHub
parent 823eeee39f
commit 729dc0c007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -167,7 +167,8 @@ public class SentinelBeanPostProcessor implements MergedBeanDefinitionPostProces
private boolean checkSentinelProtect(RootBeanDefinition beanDefinition,
Class<?> beanType, String beanName) {
return beanName != null && beanType == RestTemplate.class
// Fixes #3329: Support custom RestTemplate
return beanName != null && RestTemplate.class.isAssignableFrom(beanType)
&& checkMethodMetadataReadingVisitor(beanDefinition);
}

Loading…
Cancel
Save