File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Setter DI for the bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Setter DI for the bean" Watch "Setter DI for the bean" New topic
Author

Setter DI for the bean

sarma kiran
Ranch Hand

Joined: Jul 17, 2008
Posts: 30
Hi,
Is is possible to provide setter Injection for the bean which has static factory method?

Actually i am trying for setter injection in the bean, its showing error " No setter method found for num in java.lang.String" in configuaration file.

Can any one help me?




Regards,
Kiran

Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
It is because java.lang.String has no num attribute.
Change public static String createInstance() to public static BeanStaticDemo createInstance().


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
sarma kiran
Ranch Hand

Joined: Jul 17, 2008
Posts: 30
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setter DI for the bean