Properties file with a list as the value for an individual key

Try writing the properties as a comma separated list,
then split the value after the properties file is loaded.
For example

a=one,two,three
b=nine,ten,fourteen

You can also use org.apache.commons.configuration and change the value delimiter using the AbstractConfiguration.setListDelimiter(char) method if you’re using comma in your values.

Leave a Comment