title: How to assign bean's property an Enum value in Spring config file?
body: <p>I have a standalone enum type defined, something like this:</p>
  
  <pre><code>package my.pkg.types;
  
  public enum MyEnumType {
      TYPE1,
      TYPE2
  }
  </code></pre>
  
  <p>Now, I want to inject a value of that type into a bean property:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean name="someName" class="my.pkg.classes"&gt;
     &lt;property name="type" value="my.pkg.types.MyEnumType.TYPE1" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>...and that didn't work :(</p>
  
  <p>How should I Inject an Enum into a spring bean? </p>