方法 @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum Distance { ... } doc How To Serialize Enums as JSON Objects with Jackson