标签: java spring dependency-injection
如果可能的话,我如何使用实现特定接口的所有其他Spring bean的集合来配置Spring bean?
示例:我想将CarFactory bean与实现CarManufacturer接口的bean列表连接起来。
CarFactory
CarManufacturer
答案 0 :(得分:21)
@Inject private List<CarManufacturer> manufacturers;