title: Question on a specific use case on spring <util:map>
body: <p>I'm just trying to explore one use case of using object as a value in a spring map. Here's my example</p>
  
  <pre><code>&lt;util:map id="someSourceMap" map-class="java.util.HashMap"&gt;
  &lt;entry key="source1" value="testLine"/&gt;
  &lt;entry key="source2" value="testLine2"/&gt;
  &lt;/util:map&gt;
  
  &lt;bean id="testLine1" class="com.test.ProductLineMetadata" scope="prototype"&gt;
  &lt;constructor-arg value="PRODUCT_LINE_1"&gt;&lt;/constructor-arg&gt;
  &lt;constructor-arg value="TYPE_1"&gt;&lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  &lt;bean id="testLine2" class="com.test.ProductLineMetadata"scope="prototype"&gt;
  &lt;constructor-arg value="PRODUCT_LINE_2"&gt;&lt;/constructor-arg&gt;
  &lt;constructor-arg value="TYPE_2"&gt;&lt;/constructor-arg&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>What I'm trying to achieve is to create a map in which the value will be a new instance of ProductLineMetadata object with different parameters set through constructor argument. I don't want to create a separate bean entry for each key with the desired constructor values. Is there a better way of doing this by somehow specifying the parameters inside the map declaration itself?</p>
  
  <p>Any pointer will be highly appreciated.</p>
  
  <p>Thanks</p>