File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about MethodInvokingFactoryBean

 
Alex Armenteros
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to inject a value into an static field and found the workaround with the class MethodInvokingFactoryBean


on xml beans I think I must put this...

<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod" value="foo.bar.SpecificDBUpdates.setDAO"/>
<property name="arguments">
<list>
<ref bean="theDAOReference"/>
</list>
</property>
</bean>

But I don't understand how or when this method will be called. Enlighten me please.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic