Created
June 15, 2020 13:50
-
-
Save vbmendes/b825ecda7522e5ca1d2c69d681d18c41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/data") | |
public class DataController { | |
@GetMapping(value = "/") | |
public ResponseEntity<tPage<T>> paginate(Pageable pageable) { | |
List<T> listFromSource = source.getList(); | |
Page<T> page = PaginationUtil.paginateList(pageable, listFromSource); | |
return ResponseEntity.ok(page); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment