If the fetchResource
method is static on ResourceFetcher, why can't JobRunner simply refer to it? I don't see the need to inject ResourceFetcher.
duffymo
2010-10-11 18:42:21
If the fetchResource
method is static on ResourceFetcher, why can't JobRunner simply refer to it? I don't see the need to inject ResourceFetcher.
<bean id="resource" class="com.x.y.ResourceFetcher" factory-method="fetchResource">
<constructor-arg value="someReference"/>
</bean>
You can then inject resource
into your JobRunner
bean.