Fix cast in TestRestTemplateContextCustomizer

Closes gh-15843
This commit is contained in:
Andy Wilkinson
2019-02-05 11:38:13 +00:00
parent 8a7958ef55
commit 1f67707509
2 changed files with 83 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ class TestRestTemplateContextCustomizer implements ContextCustomizer {
private void registerTestRestTemplate(ConfigurableApplicationContext context) {
ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
if (beanFactory instanceof BeanDefinitionRegistry) {
registerTestRestTemplate((BeanDefinitionRegistry) context);
registerTestRestTemplate((BeanDefinitionRegistry) beanFactory);
}
}