Stop using explicitly aliased value
attribute as @Component
name
#34346
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Overview
As discussed in #34317, if a custom annotation is meta-annotated with
@Component
and declares a localString value
attribute that is explicitly configured (via@AliasFor
) as an override for an attribute other thanComponent.value
, the localvalue
attribute is still used as a convention-based override forComponent.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
@Component
stereotype names using@AliasFor
semantics #31089AnnotationBeanNameGenerator
issues warning about explicitly aliasedvalue
attribute #34317The text was updated successfully, but these errors were encountered: