@Inject/@Autowired inheritance
Hello Spring users,
@Inject and @Autowired are not @Inherited, but for soem reason injection using these annotations works on inherited (setter) methods.
Can someone please explain what was the reason for @Inject/@Autowired not to be @Inherited?
Also, since injection with @Inject/@Autowired works for inherited methods, is my expectation wrong that it shouldn't since these annotations are not @Inherited, or is Spring doing more than it should?
Can someone please explain (or point me to some Java annotation documentation), in case @Inject/@Autowired along existing targets also had ElementType.ANNOTATION_TYPE as their @Target, if I created a cusom @InheritedInject annotation annotated with @Inherited and @Inject, would it be detected as @Inject?
I'm using Spring 3.1 M1.
Regards,
Stevo.