In my case, i was expecting a success status and message from defined DTO from controller response for a POST /create API call. Just by adding the @JsonProperty over the DTO properties the problem is sorted.
public class ResponseDto {
@JsonProperty("StatusCode")
private String statusCode;
@JsonProperty("StatusMessage")
private String statusMessage;
public ResponseDto(String statusCode, String statusMessage) {
this.statusCode = statusCode;
this.statusMessage = statusMessage;
}
}