Announcement Announcement Module
Collapse
No announcement yet.
Externalize Collection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
Working...
X