Spring dependency injection: Inject all instances of interface

后端 未结 1 543
滥情空心
滥情空心 2021-02-19 20:06

How, if possible can I configure a Spring bean with all a collection of other Spring beans that implements a specific interface?

Example: I want to wire the CarFa

相关标签:
1条回答
  • 2021-02-19 20:50
    @Inject
    private List<CarManufacturer> manufacturers;
    
    0 讨论(0)
提交回复
热议问题