As I can see you are using the following code, why would you even want to save the properties to a "list"
List<String> allowList;
@Value("#{'${prop.myVariable}'.split(',')}")
public List<String> setAllowList(List<String> list) {
this.list= list;
}
String Chars = myProperties.getConfigValue("prop.myVariable");
List<String> allowedCharacteristics = setCharacteristics(Chars);
You have to store the properties to "allowlist", use the following code below
@Value("#{'${prop.myVariable}'.split(',')}")
public void setAllowList(List<String> list) {
allowList = list;
}
please follow this thread -> How to access a value defined in the application.properties file in Spring Boot if you have to specifically use "getConfigValue()".