Skip to content

Allow @Qualifier to be used in composed annotations with attribute overrides [SPR-14058] #18630

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-14058 and commented

Status Quo

@Qualifier currently cannot be used as a meta-annotation in composed annotations with attribute overrides configured via @AliasFor.

The reason is that Spring's official autowiring support does not function properly if @Qualifier is declared as a meta-annotation with the qualifier set to an empty string (e.g., when the user chooses not to specify a qualifier when using the composed annotation).

Impetus

This feature would be beneficial for #18151 & #18628 and is, in general, an enabler for anyone who wishes to use @Qualifier with string-based qualifier values in composed annotations.

Deliverables

  • Allow @Qualifier to be used as a meta-annotation in composed annotations with explicit attribute overrides for string-based qualifiers.

Affects: 4.2 GA

Issue Links:

Referenced from: commits 3c18a45, e83e3ec

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 applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions