I want to return small chunk of data on every client request. Suppose 100 item on each request. Here is my service side controller code-
@RequestMapping(value = "/find/customerrequestv2byperiod", method = RequestMethod.GET,
produces = "application/json")
@ResponseBody
public List<CustomerRequestV2> findCustomerReq(@RequestParam(value = "id") final String pId,
@RequestParam(value = "datetperiod") final String pdatetPeriod)
{
List<CustomerRequestV2> requestList = null;
try
{
requestList = requestService.findCustomerReq(pProductId, pReceiptPeriod);
}
catch (final ServiceException e)
{
LOG.error(ERROR_RETRIEVING_LIST + pProductId, e);
}
return requestList;
}
Here requestList contains list of data matched for this query. Since sometime it retruns more than 500 data at a time. client side am using angular.js. So just wanted to send some offset value in request itself but how to return small chunk of data from here?