-
Jan 28th, 2009, 01:30 PM
#1
Externalize Collection
Currently our beans have a reference to Apache Commons Configuration to take advantage of the getList() method and storing our lists in property files.
I'm trying to improve our DI by removing reference to the Configuration bean and instead setting the Lists in the same we set our String properties (with PropertyPlaceholderConfigurer).
Is there an accepted way of storing Lists (or Collections in general) out side of the application context file and not in XML? What do people currently do for this?
If there are no implemented good ways, what would the good way be? Would a PropertyEditorSupport that could convert text into a list or map (based on some customizable delimiter) be the best approach? Or would some sort of BeanFactoryPostProcessor that loaded the config and handled more replacement string (i.e. ${list[the.key]} to change the placeholder to list with the value from the.key ) be a better approach? This all seems straightforward for Strings, but I'm not sure about generics or changing a list of strings into a list of dates.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules