Skip to content

MergedAnnotations search does not find container for repeatable annotation #32731

@heihei180

Description

@heihei180

when i use applicationContext.getBeansWithAnnotation(Extensions.class);
in spring framework 5.3.20 , i can got a bean,
in spring framework 5.3.28, i can't got a bean.


definition of Extensions:

@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Component
public @interface Extensions {

    String[] bizId() default BizScenario.DEFAULT_BIZ_ID;

    String[] useCase() default BizScenario.DEFAULT_USE_CASE;

    String[] scenario() default BizScenario.DEFAULT_SCENARIO;

    Extension[] value() default {};

}

Definition of variable "applicationContext":

@Component
public class ExtensionBootstrap implements ApplicationContextAware {
    private ApplicationContext applicationContext;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }
}

Can someone tell me what changes have occurred here?
I think this should be a problem, but I couldn't find where the problem occurred.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions