add instanceof

pull/300/head
weihu 3 years ago
parent 173b68b0f0
commit 2b22fec46a

@ -53,10 +53,13 @@ public class PolarisRestTemplateRegisterAutoConfiguration implements Application
}
private void initRestTemplate(String beanName, Object bean) {
if (bean instanceof RestTemplate) {
RestTemplate restTemplate = (RestTemplate) bean;
restTemplate.setErrorHandler(polarisRestTemplateResponseErrorHandler);
}
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;

Loading…
Cancel
Save