Dependencies can be autowired when using the component scan feature of the Spring framework. For autowiring to work, the following XML configuration must be made:
<context:annotation-config/>
<context:component-scan base-package="[base package]"/>
where, base-package is th...