I have one abstract class and two implementations. Let’s call them ParentAbstract, ParentA and ParentB. ParentAbstract has a property of type BeanAbstract: bean. There are two implementations of this abstract class: BeanA and BeanB.
Is is possible to use Spring so that it will inject BeanA in ParentA and BeanB in ParentB?
Note that I cannot use ParentA and ParentB as Spring beans because they are Wicket pages.
In your
ParentAbstractadd an abstract methodThen in the subclasses, overrride them and annotate: