How to create a Map<String, List<String>> property in properties file that can be injectable using Spring's @Value

Viewed 750

How do I create a Map<String, List<String>> property in properties file that can be injectable using Spring's @Value?

Example code snippet in Properties java file

@PropertySource({"file:salesforce-service.properties"})
public class Properties {
    @Value("#{${student.hobbies}}")
    private Map<String, List<String>> hobbies;
}
1 Answers
Related