Created
April 22, 2018 04:20
-
-
Save LeoHeo/a7251d9b5fabd2b1ef506690ee8f785a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@RestControllerAdvice | |
public class WebRestControllerAdvice { | |
/** | |
* 필수값이 안넘어왔을때 400 던지는 Custom Exception | |
*/ | |
@ExceptionHandler(BadRequestException.class) | |
@ResponseStatus(HttpStatus.BAD_REQUEST) | |
public SimpleMessageDto invalidParameterException(BadRequestException ex) { | |
return new SimpleMessageDto("missing required value"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment