Please see https://github.com/spring-projects/spring-boot/issues/44706 for background. It would be useful to have a method similar to SimpleAutowireCandidateResolver.resolveAutowireCandidates(ConfigurableListableBeanFactory, Class<T>)
that only considers singleton beans. The key to addressing https://github.com/spring-projects/spring-boot/issues/44706 is to avoid any attempt to create prototype beans.
Comment From: jhoeller
I ended up exposing the same arguments as for the overloaded getBeanNamesForType
/getBeansOfType
variant: includeNonSingletons
and allowEagerInit
.
Comment From: jhoeller
Reopening for an includeNonSingletons
variant of ObjectProvider.stream/orderedStream
.