@@ -0,0 +1,2029 @@
+package com.rizki.mufrizal.spring.oauth2.custom.controller;%0A%0Aimport com.rizki.mufrizal.spring.oauth2.custom.domain.Buku;%0Aimport com.rizki.mufrizal.spring.oauth2.custom.service.BukuService;%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:33 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 BukuController %7B%0A%0A    @Autowired%0A    private BukuService bukuService;%0A%0A    @GetMapping(value = %22/bukus%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResources%3CBuku%3E%3E getBukus(Pageable pageable) %7B%0A        Resources%3CBuku%3E bukus = new Resources%3C%3E(bukuService.getBukus(pageable));%0A        bukus.add(linkTo(methodOn(BukuController.class).getBukus(pageable)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(bukus, HttpStatus.OK);%0A    %7D%0A%0A    @GetMapping(value = %22/bukus/%7BidBuku%7D%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResource%3CBuku%3E%3E getBuku(@PathVariable(%22idBuku%22) String idBuku) %7B%0A        Resource%3CBuku%3E buku = new Resource%3C%3E(bukuService.getBuku(idBuku));%0A        buku.add(linkTo(methodOn(BukuController.class).getBuku(idBuku)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(buku, HttpStatus.OK);%0A    %7D%0A%0A%7D%0A

add buku controller