Convert Spring boot DTO to json to include only JsonProperty
@JsonPropertyOrder({ "aaaa", "bbb", "cccc" }) public class myDto { @Id private String id; @Valid @NotNull @JsonProperty("aaaa") private String aaaa; @Valid @NotNull @JsonProperty("bbbb") private List<String> bbbb; @Valid @NotNull @JsonProperty("cccc") private List<String> cccc; // getter and setter for above 4 } I…