title: Convert string into enum during @RequestBody deserialization with a HashMap
body: <p>I'm having a hard time converting a String into an ENUM in @RequestBody annotated method argument. The Map in the argument somehow has a value of a string even though the value is an Enum type. What do I do to automatically convert the String into the correct type?</p>
  
  <p>Enum</p>
  
  <pre><code>public enum Fruit{
      ORANGE,
      APPLE,
      PEAR
  }
  </code></pre>
  
  <p>Request:</p>
  
  <pre><code>{"123":"ORANGE", "456":"APPLE"}
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>@RequestMapping(value="/updateFruit", method = RequestMethod.POST)
  public void updateFruit(@RequestBody Map&lt;String, Fruit&gt; fruitMap){
      // Fruit comes in as a String. So the map is a Map&lt;String, String&gt;
      // do stuff....
  }
  </code></pre>