Created
April 28, 2020 01:52
-
-
Save CheolhoJeon/dae7e6a461ef7f60fae4c8c2de8b8717 to your computer and use it in GitHub Desktop.
This file contains 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
@GetMapping("/api/members/{id}") | |
public ResponseEntity<Object> member(@PathVariable Long id, HttpServletResponse response) throws IOException { | |
Member member = memberDao.selectById(id); | |
if (member == null) { | |
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new ErrorResponse("no member")); | |
} | |
return ResponseEntity.status(HttpStatus.OK).body(member); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment