Spring 3.2.9:支持有序自动装配集合

Spring 3.2.9 : support for ordered autowired collections

Spring 4 提供对有序自动装配集合的支持。我认为 3.2.9 没有,即使它有所有的注解。

有人可以证实这个假设吗?

谢谢。

似乎 3.2.9 不处理 @Autowired 集合的 @Order 但通过 @PostConstruct(或 InitializingBean#afterPropertiesSet())方法实现此功能非常简单:

Collections.sort(myCollection, AnnotationAwareOrderComparator.INSTANCE);