Closed
Description
Spring Boot currently has an internal class called BeanTypeRegistry
that is used by @ConditionalOnBean
and @ConditionalOnMissingBean
. We've have a recent issue where we need something similar, but rather than make it public in Spring Boot it might be better if Spring Framework could offer methods that we could use.
What we specifically need is a way to predict the bean type in a way that's very fast to call during condition evaluation and doesn't cause any early initialization of any beans (including FactoryBeans
).
After some analysis, I'm going to split this issue up into a number of smaller parts:
- Add missing ResolvableType variants of getBeanNamesForType (Add missing ResolvableType variants of getBeanNamesForType #23335)
- Retain merged bean definition caches during post processing (Retain merged bean definition caches during post processing #23336)
- Cache isFactoryBean detection (Cache isFactoryBean detection #23337)
- Consider generics when predicting FactoryBean types (Consider generics when predicting FactoryBean types #23338)
- Add attribute support for FactoryBean bean definitions (Add attribute support for FactoryBean bean definitions #23339)
- Use static final constants for common zero length arrays (Use static final constants for common zero length arrays #23340)