title: How to create spring bean with collection data decoupled from parent bean?
body: <p>Spring has ability to <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-collection-elements" rel="noreferrer">initialisate values of core java collection types</a>.</p>
  
  <p>I have a complex collection type <code>Map&lt;String, Set&lt;String&gt;&gt; map</code>  and it inital value defined in spring config:</p>
  
  <pre><code>&lt;bean id="dao" class="ru.mypkg.dao.DaoImpl"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="map"&gt;
          &lt;map&gt;
              &lt;entry key="TABLE"&gt;
                  &lt;set&gt;
                      &lt;value&gt;COMMENT&lt;/value&gt;
                      &lt;value&gt;INDEX&lt;/value&gt;
                  &lt;/set&gt;
              &lt;/entry&gt;
              &lt;entry key="VIEW"&gt;
                  &lt;set&gt;
                      &lt;value&gt;COMMENT&lt;/value&gt;
                  &lt;/set&gt;
              &lt;/entry&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I want rewrite my config in next manner: Split it on 2 beans for more readability </p>
  
  <pre><code>&lt;bean id="dao" class="ru.mypkg.dao.DaoImpl"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="map" ref-id="myMap"/&gt;        
  &lt;/bean&gt;
  
  &lt;bean id="myMap" ..????..&gt;
          &lt;entry key="TABLE"&gt;
                  &lt;set&gt;
                      &lt;value&gt;COMMENT&lt;/value&gt;
                      &lt;value&gt;INDEX&lt;/value&gt;
                  &lt;/set&gt;
              &lt;/entry&gt;
              &lt;entry key="VIEW"&gt;
                  &lt;set&gt;
                      &lt;value&gt;COMMENT&lt;/value&gt;
                  &lt;/set&gt;
  
              &lt;/entry&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Can I achieve that with no creating additional classes?</p>