1
可以從分頁REST獲得所有價值嗎?例如,我有REST:從分頁獲得所有價值REST
@RequestMapping(value = "/divisions", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<List<Division>> getAllDivisions(Pageable pageable)
throws URISyntaxException {
log.debug("REST request to get a page of Divisions");
Page<Division> page = divisionRepository.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/divisions");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
但在我的應用程序中,我需要獲取所有部門。我試過這樣的: http://localhost:9000/api/divisions?size=MAX但它不起作用。 我必須爲此創建新的REST嗎?