I am a little confused as to why my Spring service is not returning any content. I tried mvn clean install
and I also see that the response POJO at the return statement line has actual data when I hit the breakpoint in debugger mode/print to console. Does anyone know what could be the cause?
My @RestController
@Override public MyServiceResponse getDesiredData(MyRequest myRequest) throws IOException { var resp = new MyServiceResponse(); var req = new ServiceRequest<MyRequest>(); req.setPayload(myRequest); // this update the pass by reference resp object myRequestProcessor.process(req, resp); return resp; //at this breakpoint I see data in the debugging console }
POJO:
@SuperBuilder@Data@NoArgsConstructor@JsonIgnoreProperties(ignoreUnknown = true)public class MyServiceResponse { SessionInfo sessionInfo;}@SuperBuilder@Data@NoArgsConstructor@JsonIgnoreProperties(ignoreUnknown = true)public class SessionInfo { Parameters parameters;}@SuperBuilder@Data@NoArgsConstructor@JsonIgnoreProperties(ignoreUnknown = true)public class Parameters { @JsonProperty("zip") String zip; @JsonProperty("city") String city; @JsonProperty("state") String state; @JsonProperty("storeNum") Integer storeNum; @JsonProperty("startHrs") String startHrs; @JsonProperty("endHrs") String endHrs;}