Fix build after SPR-17034 in Spring Framework
Since SPR-17034, the core container now behaves a bit differently when
dealing with `null` beans.
Given a `null` `HandlerMapping` bean named "resourceHandlerMapping":
* `context.getBean("resourceHandlerMapping", HandlerMapping.class)`
still returns a `NullBean`
* `ListableBeanFactory.getBeansOfType` will return a Map of all existing
beans, not including the `null` ones as values of the map.
Closes gh-13760
This commit is contained in:
@@ -138,7 +138,7 @@ public class WebMvcAutoConfigurationTests {
|
|||||||
@Test
|
@Test
|
||||||
public void handlerMappingsCreated() {
|
public void handlerMappingsCreated() {
|
||||||
this.contextRunner.run((context) -> assertThat(context)
|
this.contextRunner.run((context) -> assertThat(context)
|
||||||
.getBeans(HandlerMapping.class).hasSize(7));
|
.getBeans(HandlerMapping.class).hasSize(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user