Jun 28th, 2007, 01:42 PM
Populating List values from a file
I'm trying to populate List fields from values stored in text files. I've seen reference on how to load properties (key=value), but not a straight (value) file.
I'm looking at the ListFactoryBean and Resource subclasses, but I'm still not sure where I'm missing the boat. I see the PropertyPlaceholder class, but I dont know if that's what I need to be using.
So, in short, how do I populate myList with the contents of MyFile?
thanks in advance!
List myList; // assumed to be a list of String
<bean id="foo" class="Foo">
<property name="myList" value=???/>
Jun 29th, 2007, 03:56 AM
Haven't tried this approach, but I think you can do this with PropertyEditors.