Skip to content

Instantly share code, notes, and snippets.

@ctranxuan
Last active August 29, 2015 14:17
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 ctranxuan/8afc010b3327fac73655 to your computer and use it in GitHub Desktop.
Save ctranxuan/8afc010b3327fac73655 to your computer and use it in GitHub Desktop.
Some reminders
// Spring RestController: how to deal with exception and http status
@ResponseStatus(HttpStatus.NOT_FOUND)
class UserNotFoundException extends RuntimeException {
public UserNotFoundException(String userId) {
super("could not find user '" + userId + "'.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment