Here is a way to enable the use of case-insensitive enumerations request parameters. You won’t need to do any code modification in your enum.

Let’s say you have a controller class like this:

@RestController
public class MyController {
    
    @GetMapping("/test/{myEnum}")
    public String addFormatters(@PathVariable MyEnum myEnum) {
        return "Hey " + myEnum;
    }
}

And an Enum like this:

public enum MyEnum {
    HEY,
    HELLO
}

You have to add the following Spring Boot configuration:

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    
    @Override
    public void addFormatters(FormatterRegistry registry) {
        ApplicationConversionService.configure(registry);
    }
}

Tests:

  • GET /test/hEy will return Hey HEY
  • GET /test/HELLO will return Hey HELLO
  • GET /test/hello will return Hey HELLO

Tested with Spring Boot 2.1.4