Skip to content

Extend the "bootstrap = BACKGROUND" mechanism to Component-scanned beans #35495

@djechelon

Description

@djechelon

I am very enthusiast about Spring 6.2 feaute of Bean Background Initialization implemented via @Bean annotation.

However, I would suggest to extend it also to @Component-scanned beans. I have an application with thousands of beans, and I am working on improving its startup time. Basically, while I have benefitted from @Bean(bootstrap = BACKGROUND) for @Configuration-factored bean, it is not convenient to refactor a number of @Component beans into @Bean beans for reasons of simplicity.

Implementing the bootstrap = BACKGROUND attribute into @Component and derivatives seems to me to be the next step.

Any thoughts on this?

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions