Data loss when querying data using mobile
Data loss when querying data using mobile
I am using spring with Jackson to read data from server. When I request high amount of data from the production servers, I am experiencing data loss. However, it is working fine in dev environments.
@RequestMapping(value = "/mapp/acc_stmt" , method = RequestMethod.POST)
public ResponseEntity<List<StatementInfo>> statementOfAccount(
@DateTimeFormat(pattern="dd-MM-yyyy")Date from,
@DateTimeFormat(pattern="dd-MM-yyyy")Date to, long id)
List<StatementInfo> s = ledgerService.getLedgerStatement(from, to, id);
System.out.println("Statment Info Length ->" + s.size());
return new ResponseEntity<List<StatementInfo>>(s, getNoCacheHeaders(), HttpStatus.OK);
The ledgerService is producing 1350 records. However, my mobile client is only receiving apprx. 900 records.
Is there any setting or header that needs to be set?
I am using spring version 4.0.0.RELEASE
and 2.2.3 for jackson databind to convert POJO to JSON.
TIA.
1 Answer
1
Is there any setting or header that needs to be set?
answer is NO.
It should work as expected nothing extra you should do.
Try calling the service from the POSTMAN and check whether same issue persist there also.
If yes then debug it in controller to make sure that all the 1350 records are getting sent.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
The sysout before the return statement is giving me all 1300 records. I will try with postman. However, using my simulator it is giving me all records :(
– Sav Jain
Sep 17 '18 at 0:07