To use dependency injection:
If you have a bean with a class attribute, Add as a sub-element, add a property tag specifying both name and ref attributes.
<bean class="mypackage.anothersubpackage.MyTestClass">
<property name="manager" ref="registryManager"/>
</bean> Ex: name=" manager" will result in a call to setManager() in MyTestClass Ex: ref="registryManager" will look for a bean called registryManager to inject It is frequent that the name and ref properties appear to have the same values because the setter may have a similar (related) name to the bean being set.