I want to have a list of values in a .properties file, ie:
my.list.of.strings=ABC,CDE,EFG
And to load it in my class directly, ie:
By specifying the the my.list.of.strings=ABC,CDE,EFG in .properties file and using
@Value("${my.list.of.strings}") private String[] myString;
@Value("${my.list.of.strings}")
private String[] myString;
You can get the arrays of strings. And using CollectionUtils.addAll(myList, myString), you can get the list of strings.
CollectionUtils.addAll(myList, myString)