When you write:
Code:
<!-- later in some context set which component the consumer class uses -->
Do you mean programmatically, in the same bean definition file, another bean definition file, etc?
One declaritive way is to use child beans. You can define an abstract parentConsumer that gets its properties set. Then the actual component bean, a child of the parentConsumer just has to add the actual dependent components. The advantage is that the "noise' of properties is hidden away and multiple child consumers can reuse or override the details. There is no need for an actual parent class, this is all within the bean definition schema instance.
J. Betancourt