@ -95,17 +95,17 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
@@ -95,17 +95,17 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
* /
@Nullable
protected String determineBeanNameFromAnnotation ( AnnotatedBeanDefinition annotatedDef ) {
AnnotationMetadata a md = annotatedDef . getMetadata ( ) ;
Set < String > types = a md. getAnnotationTypes ( ) ;
AnnotationMetadata meta data = annotatedDef . getMetadata ( ) ;
Set < String > anno tationT ypes = meta data . getAnnotationTypes ( ) ;
String beanName = null ;
for ( String type : types ) {
AnnotationAttributes attributes = AnnotationConfigUtils . attributesFor ( a md, type ) ;
for ( String anno tationT ype : anno tationT ypes) {
AnnotationAttributes attributes = AnnotationConfigUtils . attributesFor ( meta data , anno tationT ype) ;
if ( attributes ! = null ) {
Set < String > metaTypes = this . metaAnnotationTypesCache . computeIfAbsent ( type , key - > {
Set < String > result = a md. getMetaAnnotationTypes ( key ) ;
Set < String > metaAnnotation Types = this . metaAnnotationTypesCache . computeIfAbsent ( anno tationT ype, key - > {
Set < String > result = meta data . getMetaAnnotationTypes ( key ) ;
return ( result . isEmpty ( ) ? Collections . emptySet ( ) : result ) ;
} ) ;
if ( isStereotypeWithNameValue ( type , metaTypes , attributes ) ) {
if ( isStereotypeWithNameValue ( anno tationT ype, metaAnnotation Types , attributes ) ) {
Object value = attributes . get ( "value" ) ;
if ( value instanceof String currentName & & ! currentName . isBlank ( ) ) {
if ( beanName ! = null & & ! currentName . equals ( beanName ) ) {