-
Couldn't load subscription status.
- Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Overview
As discussed in #34317, if a custom annotation is meta-annotated with @Component and declares a local String value attribute that is explicitly configured (via @AliasFor) as an override for an attribute other than Component.value, the local value attribute is still used as a convention-based override for Component.value.
The result is that a local value attribute will be used as a custom @Component name, even when that is clearly not the intent.
In light of that, we will stop using a value attribute that is explicitly aliased to something other than @Component.value as the @Component name, beginning with Spring Framework 7.0.
Related Issues
- AnnotationTypeMapping tracks @AliasFor mappings as convention-based #28773
- Look up
@Componentstereotype names using@AliasForsemantics #31089 - Remove convention-based annotation attribute override support #28761
AnnotationBeanNameGeneratorissues warning about explicitly aliasedvalueattribute #34317
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement