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:

public class MyController {
    public String addFormatters(@PathVariable MyEnum myEnum) {
        return "Hey " + myEnum;

And an Enum like this:

public enum MyEnum {

You have to add the following Spring Boot configuration:

public class WebMvcConfig implements WebMvcConfigurer {
    public void addFormatters(FormatterRegistry registry) {


  • 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