@@ -0,0 +1,2221 @@
+package com.rizki.mufrizal.spring.oauth2.custom.controller;%0A%0Aimport com.rizki.mufrizal.spring.oauth2.custom.domain.Peminjaman;%0Aimport com.rizki.mufrizal.spring.oauth2.custom.service.PeminjamanService;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.data.domain.Pageable;%0Aimport org.springframework.hateoas.Resource;%0Aimport org.springframework.hateoas.Resources;%0Aimport static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;%0Aimport static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn;%0Aimport org.springframework.http.HttpEntity;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.web.bind.annotation.CrossOrigin;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0A/**%0A *%0A * @Author Rizki Mufrizal %3Cmufrizalrizki@gmail.com%3E%0A * @Web %3Chttps://RizkiMufrizal.github.io%3E%0A * @Since Feb 5, 2017%0A * @Time 8:05:47 PM%0A * @Encoding UTF-8%0A * @Project Spring-OAuth2-Custom%0A * @Package com.rizki.mufrizal.spring.oauth2.custom.controller%0A *%0A */%0A@RestController%0Apublic class PeminjamanController %7B%0A%0A    @Autowired%0A    private PeminjamanService peminjamanService;%0A%0A    @GetMapping(value = %22/peminjamans%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResources%3CPeminjaman%3E%3E getPeminjamans(Pageable pageable) %7B%0A        Resources%3CPeminjaman%3E peminjamans = new Resources%3C%3E(peminjamanService.getPeminjamans(pageable));%0A        peminjamans.add(linkTo(methodOn(PeminjamanController.class).getPeminjamans(pageable)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(peminjamans, HttpStatus.OK);%0A    %7D%0A%0A    @GetMapping(value = %22/peminjamans/%7BidPeminjaman%7D%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResource%3CPeminjaman%3E%3E getPeminjaman(@PathVariable(%22idPeminjaman%22) String idPeminjaman) %7B%0A        Resource%3CPeminjaman%3E peminjaman = new Resource%3C%3E(peminjamanService.getPeminjaman(idPeminjaman));%0A        peminjaman.add(linkTo(methodOn(PeminjamanController.class).getPeminjaman(idPeminjaman)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(peminjaman, HttpStatus.OK);%0A    %7D%0A%0A%7D%0A

add peminjaman controller