I am trying to load a map from .properties file into a HashMap
the properties file has the following:
try.map= one=1,\
two=2
The code:
@org.springframework.beans.factory.annotation.Value("${try.map}")
HashMap<String, String> tryMap;
And loading the property to the map results in :
java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [java.util.HashMap]: no matching editors or conversion strategy found
Any ideas how to create a mapping strategy for this?