currently I'm experiencing some strange behaviour when using inheritance on one of my classes.
The class ReminderReport is derived from InvoiceReport since they share a lot of common functionality.
Most of my application uses annotations for configuration, so I annotated
public class ReminderReport extends InvoiceReport
public class InvoiceReport extends AddressedReport<Invoice>
Now when I try to inject the InvoiceReport into another bean, like so:
Spring injects a ReminderReport, which would probably make sense in another context but of course is not what I want in this case.
private InvoiceReport invoiceReport
I tried adding
to both InvoiceReport class and injected field, but unfortunately that didn't help.
Probably I'll just try and configure the beans via a separate XML file for the moment (to force instantiation of InvoiceReport as a separate class) and see if that works for me.
In the long run, annotation-based configuration would be much preferable, though.