Spring @Order 无效问题

来源:互联网 发布:暴力摩托2004mac 编辑:程序博客网 时间:2024/06/05 07:10

在Spring 中,我们可以使用@Autowire获取Spring 容器中的相同类型bean的集合形式,

@Autowired

private List<BeanInterface> list;

@Autowired

private Set<BeanInterface> set;

@Autowired

private Map<String, BeanInterface> map;

@Order可以指定Bean在集合中的顺序,但只针对List集合有效,Set和Map集合都无效

0 0
原创粉丝点击