Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.35 KB | None | 0 0
  1. @GetMapping("/")
  2. public ResponseEntity<Map<String, Object>> getAll() {
  3.         List<RestResult> listRest = restService.getAll();
  4.         Map<String, Object> hasil = new HashMap<>();
  5.         hasil.put("data", listRest);
  6.         hasil.put("status", "berhasil");
  7.         hasil.put("code", "200");
  8.         return new ResponseEntity<>(hasil, HttpStatus.OK);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement