
Originally Posted by
lfty
Is there a way to achieve this functionality without annotations? I am stuck with java 1.4

- define abstract bean
- define your dependencies for it
- use parent attribute of the any class that needs to inject service
Code:
<bean id="abstractWithService" abstract="true">
<property name="service" ref="service" />
</bean>
<bean id="service" class="xxx.xxx.Service">
...
</bean>
<bean id="anyClassExtendingBase" class="xxx.xxx.Service" parent="abstractWithService">
...
</bean>