Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created April 18, 2019 16:08
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/128229e9e021bdfa14c8930988df0759 to your computer and use it in GitHub Desktop.
Save recursivecodes/128229e9e021bdfa14c8930988df0759 to your computer and use it in GitHub Desktop.
@Get("/list{/offset}{/max}")
List<Person> getPersons(@Nullable Optional<Integer> offset, @Nullable Optional<Integer> max) {
if( offset && max ) {
return personService.findAll([offset: offset.get(), max: max.get()])
}
else {
return personService.findAll()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment