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:

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

And an Enumeration:

public enum MyEnum {

You have to create a custom Spring converter that converts String into MyEnum:

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

public class MyEnumConverter implements Converter<String, MyEnum> {

    public MyEnum convert(String value) {
        return MyEnum.valueOf(value.toUpperCase());


  • 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.2.6