Skip to content

Instantly share code, notes, and snippets.

@CheolhoJeon
Last active April 27, 2020 10:12
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 CheolhoJeon/65a539f28ef09f57cc41f564f4b96a59 to your computer and use it in GitHub Desktop.
Save CheolhoJeon/65a539f28ef09f57cc41f564f4b96a59 to your computer and use it in GitHub Desktop.
@GetMapping("/api/members/{id}")
public Member member(@PathVariable Long id, HttpServletResponse response) throws IOException {
Member member = memberDao.selectById(id);
if (member == null) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return null;
}
return member;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment