|
From: Juergen H. <ju...@in...> - 2005-04-08 22:44:31
|
On a related note: Since Spring 1.2 RC1, there are "ref" and "value" shortcut attributes on the <property> tag (and others): <property name="logisticProviderManagerService" ref="logisticProviderManagerService"/> Of course, this still explicitly mentions the name of the bean. As I said, autowire-by-name is probably what you're looking for then. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Juergen Hoeller Sent: Saturday, April 09, 2005 12:40 AM To: spr...@li... Subject: Re: [Springframework-developer] verbosity of XML property declaration Well, if it's about avoiding to express the "logisticProviderManagerService" name twice: why not use autowiring-by-name? This can be defined on a per-bean basis, and automatically wires all bean properties that have matching beans in the context (with the bean name matching the property name). Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Marc Logemann Sent: Saturday, April 09, 2005 12:28 AM To: spr...@li... Subject: [Springframework-developer] verbosity of XML property declaration Hi, i ve followed with great interest the xml namespace discussion today and my concern is also in the area of xml verbosity. While looking at my context XML files (which allready reached 800 lines after 3 weeks of project programming), i saw that i have plenty of definitions which go like this: <bean...> <property name="logisticProviderManagerService"><ref bean="logisticProviderManagerService"/></property> </bean> If its not only me who prefers (whenever possible) to have the same attribute name than the bean name/id, it would be nice to have something like this: <bean...> <property name="logisticProviderManagerService" refbean="true"/> </bean> or <property name="logisticProviderManagerService" bean="ref|local"/> But i really dont know how many others do it this way. So i dont know if this is of common interest here. If its not of common interest, or if i feel that this is a must have, i assume that the package org.springframework.beans.factory.xml is my friend right? ;-) -- regards Marc Logemann http://www.logemann.org http://www.logentis.de ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |