Skip to content

Introduce getBeanProvider variants with allowEagerInit flag #25559

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jhoeller opened this issue Aug 7, 2020 · 0 comments
Closed

Introduce getBeanProvider variants with allowEagerInit flag #25559

jhoeller opened this issue Aug 7, 2020 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented Aug 7, 2020

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 simpler ListableBeanFactory retrieval methods: namely the ability to suppress eager initialization for type checks. Introducing dedicated getBeanProvider variants with an allowEagerInit flag at ListableBeanFactory level closes that gap without introducing the concept of eager/lazy type initialization at the basic BeanFactory level (where no other such methods with an allowEagerInit flag exist).

There is also an includeNonSingletons flag on those ListableBeanFactory 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 of ObjectProvider retrieval methods.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Aug 7, 2020
@jhoeller jhoeller added this to the 5.3 M2 milestone Aug 7, 2020
@jhoeller jhoeller self-assigned this Aug 7, 2020
rcaught pushed a commit to unofficial-shibboleth-mirror/spring-extensions that referenced this issue Oct 29, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant