title: Spring (Java) - register vs list
body: <p>I have the following:</p>
  
  <pre><code>List&lt;Color&gt; acceptableColors;
  </code></pre>
  
  <p>Using Spring, would it be best to instantiate this list this way:</p>
  
  <pre><code>&lt;bean&gt;
      &lt;list&gt;
      &lt;value ref="orange" /&gt;
      &lt;value ref="yellow" /&gt;
      ....
      &lt;/list&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Or, is there a way to do a register scheme, where we use Spring to perform the following Java code:</p>
  
  <pre><code>ColorRegister.register(orange)
  ColorRegister.register(yellow)
  </code></pre>