Closed
Description
If initializing bean via constructor dependency injection, Spring will do the candidates look-up by parameter type (essentially via BeanFactoryUtils#beanNamesForTypeIncludingAncestors
) which is really slow if application getting huge. We are searching an approach to tell Spring to look-up candidates by constructor's parameter name.
I've read the code in ConstructorResolver
but cannot find a way to achieve constructor dependency injection by parameter name. By the way there is a similar question on Stack Overflow: Spring autowire by name constructor arguments, there is just a work-around but not solution.
Can Spring support this feature if parameter name is available in runtime?
Affects: <All Spring Framework versions>