Introduce getBeanProvider variants with allowEagerInit flag #25559
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Triggered by gh-24644, the unique capabilities of
getBeanProvider
(which include stream-based access to generic type matches as well as ordered stream access) are useful for many purposes but miss a key ingredient from the simplerListableBeanFactory
retrieval methods: namely the ability to suppress eager initialization for type checks. Introducing dedicatedgetBeanProvider
variants with anallowEagerInit
flag atListableBeanFactory
level closes that gap without introducing the concept of eager/lazy type initialization at the basicBeanFactory
level (where no other such methods with anallowEagerInit
flag exist).There is also an
includeNonSingletons
flag on thoseListableBeanFactory
retrieval methods which we are not mirroring here since it is less useful in general and potentially irritating in terms of semantics for the full set ofObjectProvider
retrieval methods.The text was updated successfully, but these errors were encountered: