I have a method invoking bean which calls a method to perform some sort of initialization on a targetBean and another bean who needs a twitter class albeit initialized.
<bean id="twitter" class="twitter4j.Twitter"></bean>
<bean id="twitterInjector"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="twitter"/>
<property name="targetMethod">
<value>setOAuthConsumer</value>
</property>
<property name="arguments">
<list>
<value>consumerKey</value>
<value>consumerSecret</value>
</list>
</property>
</bean>
<bean id="MyPageController"
class="com.hardwire.controller.MyPageController">
<property name="twitter" ref="What should I put here? twitter or
twitterInjector?/>
.
.
.
</bean>
What should I inject into the MyPageController, twitterInjector or twitter?