title: How allow case-insensitive mapping of enums in jackson/Spring boot?
body: <p><strong>NOTE: This is not a duplicate. That other question is not about auto-marshalling of Spring request params. It has a solution where you manually marshall objects with jackson.</strong></p>
  
  <p>I want to allow devs to create request objects with enums that can match with case-insensitivity. Other fields/properties may need case-sensitive matching, but the enums should be case-insensitive.</p>
  
  <p>The only way I've found so far (<code>initBinding</code>) requires you to specify the exact enum class at compile time. I am looking for a more generic way to marshall the strings in the JSON request into enums.</p>
  
  <p>The only current way I've found:</p>
  
  <pre><code>@RestController
  public class TestController
  {
      //...elided...
  
      @InitBinder
      public void initBinder(final WebDataBinder webdataBinder)
      {
          webdataBinder.registerCustomEditor( MyEnum.class, new CaseInsensitiveEnumConverter() );
      }
  }
  </code></pre>
  
  <p>But this requires compiling with the enums pre-known.</p>