Skip to content

Support for @Order at the @Bean method level [SPR-11310] #15934

Closed
@spring-projects-issues

Description

@spring-projects-issues

Shaozhen Ding opened SPR-11310 and commented

This won't order the wired list. Since AnnotationAwareOrderComparator only scan the Type annotations instead of Method annotations.

@Bean
@Order(2)
public Store getStore2(){
	return new Store();
}

@Bean
@Order(1)
public Store getStore1(){
	return new Store();
}

@Bean
    @Order(3)
public Store getStore3(){
	return new Store();
}

}

@Autowired
List<Store> stores;

Affects: 4.0 GA

Issue Links:

Referenced from: commits 001d0e7, c6d29f1

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions