java - accessing map property from .properties file in application context (Spring) -


in .properties file have this:

map = key1=value1, key2=value2 

how access key-value pairs in applicationcontext.xml using placeholders? know if property string be:

<bean id="string_prop" class="java.lang.string">     <constructor-arg value="${string.prop}"/> </bean> 

i've seen this:

<util:map id="map_prop" key-type="java.lang.string" value-type="java.lang.string">     <entry key="key" value="value"></entry> </util:map> 

but i'm not sure how access key-value pairs .properties file.

if want access map in java code means use below,

in applicationcontext.xml

<bean id="mapname" class="java.util.hashmap">         <constructor-arg ref="property" />  </bean>  <util:properties id="property" location="propername.properties"/> 

in java:

 @autowired     protected hashmap<string, string> mapname;