Skip to content

Instantly share code, notes, and snippets.

@KucherenkoIhor
Created February 6, 2017 17:10
Show Gist options
  • Save KucherenkoIhor/c18e2ed5c6c7cd669ba0b0cbcc9c4c7c to your computer and use it in GitHub Desktop.
Save KucherenkoIhor/c18e2ed5c6c7cd669ba0b0cbcc9c4c7c to your computer and use it in GitHub Desktop.
@RequestMapping(
path = "/api/groups",
method = RequestMethod.GET)
public @ResponseBody List<StudentsGroup> getGroups() {
List<StudentsGroup> result = new ArrayList<>();
try {
mGroupsRepository.findAll().forEach(result::add);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment