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

Setter DI for the bean

sarma kiran
Ranch Hand

Joined: Jul 17, 2008
Posts: 30
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?


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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Setter DI for the bean
It's not a secret anymore!