예제 #1
0
 @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);
 }
예제 #2
0
 @RequestMapping(method = RequestMethod.GET)
 public RestResponse<List<CategoryDto>> findCategories(
     @RequestParam Map<String, String> requestParams) {
   Pageable pageable = createPageable(requestParams, "name");
   return categoryBuilderService.find(requestParams, pageable);
 }