Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Provide functionality similar to Spring Boot's BeanTypeRegistry #23056

Closed
6 tasks done
philwebb opened this issue May 29, 2019 · 3 comments
Closed
6 tasks done

Provide functionality similar to Spring Boot's BeanTypeRegistry #23056

philwebb opened this issue May 29, 2019 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented May 29, 2019

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:

@tkvangorder
Copy link

@philwebb Any movement on this issue? I could take a stab at PR for this, but I would need some guidance on which package to move the code and/or what to rename the BeanTypeRegistry such that it conforms to how things are organized in the core Spring framework.

@philwebb
Copy link
Member Author

Thanks for the offer @tkvangorder but I'm already in the middle of trying various changes. We won't be able to migrate BeanTypeRegistry as it is, instead we need to look at changing some of the core BeanFactory implementations. Unfortunately that's quite a complex part of the codebase so it's taking some time.

@tkvangorder
Copy link

yep, not for the faint of heart. 8) Make sense, thank you!

@philwebb philwebb self-assigned this Jul 23, 2019
@philwebb philwebb added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 23, 2019
@philwebb philwebb added this to the 5.2 RC1 milestone Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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

4 participants