Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created July 1, 2019 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recursivecodes/ebbf72adbaa8b80845b2aab5fc3a101a to your computer and use it in GitHub Desktop.
Save recursivecodes/ebbf72adbaa8b80845b2aab5fc3a101a to your computer and use it in GitHub Desktop.
UserRepository.java
@Path("/list/{offset}/{max}")
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getAllUsersPaginated(@PathParam("offset") int offset, @PathParam("max") int max) {
    return Response.ok(this.userRepository.findAll(offset, max)).build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment