title: spring - How to set List of java.util.Locale in Spring XML?
body: <p>How can I configure list of java.util.Locale in Spring XML?</p>
  
  <p>This is what I tried (which obviously didn't work..):-</p>
  
  <pre><code>&lt;bean
      class="x.y.z.CommandBean"
      scope="prototype"&gt;
      &lt;property name="locales"&gt;
          &lt;list value-type="java.util.Locale"&gt;
              &lt;value&gt;Locale.US&lt;/value&gt;
              &lt;value&gt;Locale.FR&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Exception :-</p>
  
  <pre><code> org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.util.Locale';
  </code></pre>
  
  <p>Also, is there any way I can move the locale as comma separated values in a .properties file? </p>