Commits

Endy Muhardin  committed f68c36c

remove variabel yang tidak terpakai

  • Participants
  • Parent commits 352b50a

Comments (0)

Files changed (1)

File belajar-restful-web/src/main/java/com/artivisi/belajar/restful/ui/controller/MenuController.java

 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
+import org.springframework.data.web.PageableDefaults;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 
     @RequestMapping(value = "/menu", method = RequestMethod.GET)
     @ResponseBody
-    public List<Menu> findAll(
-            Pageable pageable,
-            HttpServletResponse response) {
-
-        return belajarRestfulService.findAllMenu(pageable).getContent();
+    public Page<Menu> findAll(Pageable pageable) {
+        return belajarRestfulService.findAllMenu(pageable);
 
     }