Skip to content

Introduce support for custom parameter names in ParameterResolutionDelegate #36534

Description

@sbrannen

Overview

The resolveDependency() utility method in ParameterResolutionDelegate resolves a dependency using the name of the parameter as a fallback qualifier. That suffices for most use cases; however, there are times when a custom parameter name should be used instead.

For example, for our Bean Override support in the Spring TestContext Framework, an annotation such as @MockitoBean("myBean") specifies an explicit name that should be used instead of the name of the annotated parameter.

Furthermore, introducing support for custom parameter names will greatly simplify the logic in SpringExtension that will be required to implement #36096.

Related Issues

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions