in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
When using @Bean as meta-annotation, Configuration class enhancement correctly takes the meta-annotated methods, but ConfigurationClassParser does not correctly registers @Bean methods.
This comes from MethodMetadataReadingVisitor.visitAnnotation() :
This works when registering configuration classes by Class reference, e.g. through register(Class...) calls on AnnotationConfigApplicationContext. However, I've just reproduced that it does not work when specified through class names only, e.g. from XML bean definitions or as a result of classpath scanning, when ASM is being used. I'll make sure that the ASM mode of processing catches up with regular Class-based processing there.
in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
2 participants
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
Didier Villevalois opened SPR-10488 and commented
When using
@Bean
as meta-annotation, Configuration class enhancement correctly takes the meta-annotated methods, but ConfigurationClassParser does not correctly registers@Bean
methods.This comes from MethodMetadataReadingVisitor.visitAnnotation() :
Here a null metaAnnotationMap argument is passed to AnnotationAttributesReadingvisitor. I guess more things should be added to methodMetadataMap.
As a result, in ConfigurationClassParser:247 :
getAnnotatedMethods() does not return methods meta-annotated with
@Bean
.Do you need a test case ? Or is this easy enough to reproduce ?
Affects: 3.2.2
Backported to: 3.2.7
The text was updated successfully, but these errors were encountered: