|
From: Juergen H. <ju...@in...> - 2005-07-19 15:59:20
|
Actually, this can already be achieved through using MapFactoryBean, ListFactoryBean and SetFactoryBean, respectively - passing a source <map> / <list> / <set> in and specifying the desired "targetMapClass" / "targetListClass" / "targetSetClass". I don't see much advantage in a "type" attribute on the corresponding tags directly, actually. It's not that common to override the collection implementations on a per-collection basis to justify a special shortcut for this, IMO. Or are you trying to centrally override the default Map / List / Set implementations that Spring uses for <map> / <list> / <set>? Specifying those implementation classes _once_ rather than repeating them for every single collection definition? Juergen ________________________________ From: spr...@li... [mailto:spr...@li...] On Behalf Of Crater, Jon (EDS) Sent: Tuesday, July 19, 2005 5:34 PM To: spr...@li... Subject: [Springframework-developer] feature request i currently have a need to customize the implementation classes created when spring parses the definitions for properties containing <map>, <list>, etc. elements. currently i have to subclass AbstractXmlApplicationContext and override initBeanDefinitionReader(XmlBeanDefinitionReader r) to call setParserClass(Class c) with my own subclass of BeanDefinitionParser, which in turn overrides parseMapElement, etc. i was hoping that future releases of spring could support this situation via out of the box configuration. it seems like it would be fairly straightforward to respect a "type" attribute of the <map> and <list> (and any other) elements to support customization of the Map/Collection implementation without requiring custom extensions. if there's sufficient interest, i'd be happy to contribute. jon |