Use unique testRestTemplate bean name
Update `SpringBootTestContextCustomizer` to use the full qualified TestRestTemplate as the registered bean name. Prior to this commit it was possible that the customizer would replace the relatively common bean name `testRestTemplate`. Fixes gh-7711
This commit is contained in:
@@ -62,7 +62,7 @@ class SpringBootTestContextCustomizer implements ContextCustomizer {
|
||||
|
||||
private void registerTestRestTemplate(ConfigurableApplicationContext context,
|
||||
BeanDefinitionRegistry registry) {
|
||||
registry.registerBeanDefinition("testRestTemplate",
|
||||
registry.registerBeanDefinition(TestRestTemplate.class.getName(),
|
||||
new RootBeanDefinition(TestRestTemplateFactory.class));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user