-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sébastien Deleuze opened SPR-17272 and commented
Unlike DependencyObjectProvider which seems to support this use case, the ObjectProvider implementation returned by DefaultListableBeanFactory#getBeanProvider(ResolvableType) does not seems to support List<Foo> correctly.
This test is green:
@Test
public void registerBeanAndGetBeanProvider() {
GenericApplicationContext context = new GenericApplicationContext();
context.registerBean(ViewResolver.class, () -> new MustacheViewResolver());
assertNotNull(context.getDefaultListableBeanFactory().getBeanProvider(ResolvableType.forClass(ViewResolver.class)).getIfAvailable());
}This test is red:
@Test
public void registerBeanAndGetBeanProviderList() {
GenericApplicationContext context = new GenericApplicationContext();
context.registerBean(ViewResolver.class, () -> new MustacheViewResolver());
assertNotNull(context.getDefaultListableBeanFactory().getBeanProvider(ResolvableType.forClassWithGenerics(List.class, ViewResolver.class)).getIfAvailable());
}This difference of behavior prevents Kofu configuration and Dave Syer FuncApplication to instantiate WebFluxAutoConfiguration.WebFluxConfig in a functional way and get view resolution support.
Affects: 5.1 RC3
Issue Links:
- ObjectProvider iterable/stream access for "beans of type" resolution in @Bean methods [SPR-11419] #16046 ObjectProvider iterable/stream access for "beans of type" resolution in
@Beanmethods - Autowiring inconsistency: @Qualifier works with HashMap but not with Map [SPR-17197] #21731 Autowiring inconsistency:
@Qualifierworks with HashMap but not with Map
Referenced from: commits 65c8fa4, 41d4cb5, 7562761
0 votes, 8 watchers
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement