Fix @Bean meta-annotation detection when using ASM [SPR-10488] #15121
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
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: