Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Created April 22, 2018 03:41
Show Gist options
  • Save LeoHeo/06ca3bd8bff6c57b2dc35aa31b80b4ed to your computer and use it in GitHub Desktop.
Save LeoHeo/06ca3bd8bff6c57b2dc35aa31b80b4ed to your computer and use it in GitHub Desktop.
@PostMapping("/signup")
@ResponseStatus(HttpStatus.CREATED)
public void signUp(@Valid @RequestBody UserSaveDto userSaveDto, BindingResult result) {
if (result.hasErrors()) {
throw new BadRequestException("missing required value");
}
userService.saveUser(userSaveDto);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment