|
From: Winter A. <and...@wi...> - 2004-10-07 14:16:24
|
Be aware you must then check for constructs like <property name=3D"user" bean=3D"aBean"><value>admin</value></property> Anyway it's a good idea. Having introduced Spring in our projects, I was faced with complains = about writing nearly the same configuration over and over again, e.g. = applying an interceptor to many beans or setting a session factory into many DAOs. = Child beans solve some problems but there should be a more explicit mechanism = not a reuse of the <bean> tag. - Andreas > -----Original Message----- > From: j=FCrgen h=F6ller [werk3AT] = [mailto:jue...@we...] > Sent: Thursday, October 07, 2004 3:09 PM > To: spr...@li... > Subject: [Springframework-developer] Simplify typical xml setup = syntax >=20 >=20 > Another request to simply <property> usage in XML bean definitions: >=20 > http://opensource.atlassian.com/projects/spring/browse/SPR-379 >=20 > This time, it's not about considering CDATA inside=20 > <property>...</property> as value, but rather about further=20 > attributes for the <property> tag itself: >=20 > <property name=3D"user" value=3D"admin"/>=20 > <property name=3D"linkFormatter" bean=3D"linkFormatter"/>=20 >=20 > I'd probably name the bean reference attributes differently,=20 > i.e. "ref-bean" respectively "ref-local". But the general=20 > idea is not bad - it's cleaner than the CDATA-as-value=20 > suggestion, I guess. >=20 > Let's compare the currently necessary markup: >=20 > <property name=3D"user"><value>admin</value></property> > <property name=3D"linkFormatter"><ref=20 > bean=3D"linkFormatter"/></property> >=20 > Which is clearly more verbose, even if not too much. The main=20 > advantage of the attribute version is that it avoids closing=20 > tags completely. >=20 > Thoughts? >=20 > Juergen >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on=20 > ITManagersJournal > Use IT products in your business? Tell us what you think of=20 > them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to=20 > find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > = https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |