@@ -0,0 +1,2189 @@
+package com.rizki.mufrizal.spring.oauth2.custom.controller;%0A%0Aimport com.rizki.mufrizal.spring.oauth2.custom.domain.Mahasiswa;%0Aimport com.rizki.mufrizal.spring.oauth2.custom.service.MahasiswaService;%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:40 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 MahasiswaController %7B%0A%0A    @Autowired%0A    private MahasiswaService mahasiswaService;%0A%0A    @GetMapping(value = %22/mahasiswas%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResources%3CMahasiswa%3E%3E getMahasiswas(Pageable pageable) %7B%0A        Resources%3CMahasiswa%3E mahasiswas = new Resources%3C%3E(mahasiswaService.getMahasiswas(pageable));%0A        mahasiswas.add(linkTo(methodOn(MahasiswaController.class).getMahasiswas(pageable)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(mahasiswas, HttpStatus.OK);%0A    %7D%0A%0A    @GetMapping(value = %22/mahasiswas/%7BidMahasiswa%7D%22)%0A    @CrossOrigin%0A    public HttpEntity%3CResource%3CMahasiswa%3E%3E getMahasiswa(@PathVariable(%22idMahasiswa%22) String idMahasiswa) %7B%0A        Resource%3CMahasiswa%3E mahasiswa = new Resource%3C%3E(mahasiswaService.getMahasiswa(idMahasiswa));%0A        mahasiswa.add(linkTo(methodOn(MahasiswaController.class).getMahasiswa(idMahasiswa)).withSelfRel());%0A%0A        return new ResponseEntity%3C%3E(mahasiswa, HttpStatus.OK);%0A    %7D%0A%0A%7D%0A

add mahasiswa controller