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

Allow @Import and @ComponentScan classes to use constructor injection #23637

Closed
philwebb opened this issue Sep 13, 2019 · 0 comments
Closed

Allow @Import and @ComponentScan classes to use constructor injection #23637

philwebb opened this issue Sep 13, 2019 · 0 comments
Labels
type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Sep 13, 2019

Currently the ImportBeanDefinitionRegistrar, ImportSelector, DeferredImportSelector.Group and TypeFilter interfaces allow the following callbacks to be used:

  • EnvironmentAware
  • BeanFactoryAware
  • BeanClassLoaderAware
  • ResourceLoaderAware

It would be very nice if constructor arguments could be used as an alternative to these. This would allow implementation to use final fields.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 13, 2019
@philwebb philwebb changed the title Allow @Import classes to use constructor injection Allow @Import and @ComponentScan classes to use constructor injection Sep 13, 2019
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 13, 2019
@philwebb philwebb added this to the 5.2 GA milestone Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants