@RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public RestResponse<CategoryDto> findCategory( @PathVariable("id") Integer id, @RequestParam Map<String, String> requestParams) { CategoryDto categoryDto = categoryBuilderService.find(id, requestParams); return new RestResponse<>(categoryDto); }
@RequestMapping(method = RequestMethod.GET) public RestResponse<List<CategoryDto>> findCategories( @RequestParam Map<String, String> requestParams) { Pageable pageable = createPageable(requestParams, "name"); return categoryBuilderService.find(requestParams, pageable); }