I have an Enum desrcibed below:
public enum OrderType { UNKNOWN(0, \"Undefined\"), TYPEA(1, \"Type A\"), TYPEB(2, \"Type B\"), TYPEC(3, \"Type C\");
In Spring Boot 2, the easiest way is to declare in your application.properties:
spring.jackson.serialization.WRITE_ENUMS_USING_TO_STRING=true spring.jackson.deserialization.READ_ENUMS_USING_TO_STRING=true
and define the toString() method of your enums.