|
From: Alef A. <al...@jt...> - 2004-09-17 07:12:23
|
Paul, Have a look at the following question on the forum (which I think is the better place to post questions, they get answered much quicker than on the developers list). http://forum.springframework.org/viewtopic.php?t=3D756&highlight=3D Lukt het verder een beetje ;-)? Gr. Alef =20 > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of 452 - Buying, Paul > Sent: Tuesday, September 14, 2004 3:46 PM > To: spr...@li... > Subject: [Springframework-developer] Error bean container on=20 > bean constructor argument >=20 >=20 > Dear list, >=20 > I've been working with an error on a constructor argument in=20 > the bean container. Spring seems to have problems with a=20 > primitive boolean <constructor-arg> in a <bean> as in: >=20 > <constructor-arg><value>true</value></constructor-arg> >=20 > But this is the way to go right? It says so in the Spring ref. >=20 > The error I get is this: >=20 > org.springframework.beans.factory.UnsatisfiedDependencyExcepti > on: Error creating bean with name 'customDateEditor' defined=20 > in resource [/WEB-INF/applicationContext.xml] of=20 > ServletContext: Unsatisfied dependency expressed through=20 > constructor argument with index 1 of type > [boolean]: Did you specify the correct bean references as=20 > generic constructor arguments? >=20 > The other arg is a SimpleDateFormat, here the whole definition. >=20 >=20 > <bean id=3D"customEditorConfigurer" > class=3D"org.springframework.beans.factory.config.CustomEditorCo > nfigurer"> > <property name=3D"customEditors"> > <map> > <entry key=3D"java.util.Date"><ref=20 > local=3D"customDateEditor"/></entry> > </map> > </property> > </bean> >=20 > <bean id=3D"customDateEditor" > class=3D"org.springframework.beans.propertyeditors.CustomDateEditor"> > <constructor-arg><ref > local=3D"dateFormatSql"/></constructor-arg> > <constructor-arg><value>true</value></constructor-arg> > </bean> >=20 > <bean id=3D"dateFormatSql" class=3D"java.text.SimpleDateFormat"> > =09 > <constructor-arg><value>yyyy-MM-dd</value></constructor-arg> > </bean> >=20 >=20 > The obvious goal here is simply to get a CustomDateEditor registered. >=20 > Thank ahead! >=20 > Paul. >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one=20 > of 170 Project Admins to receive an Apple iPod Mini FREE for=20 > your judgement on who ports your project to Linux PPC the=20 > best. Sponsored by IBM.=20 > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php=20 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 |