Closed
Description
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:
- Document common use cases for @Order vs @Priority vs @DependsOn [SPR-16213] #20761 Document common use cases for
@Order
vs@Priority
vs@DependsOn