请举例说明如何在 Spring 中注入一个 Java Collection?

答案解析

可以在 XML 中用 <list>、<set>、<map>、<props> 标签注入集合类型属性;注解方式用 @Autowired 注入集合类型字段即可。