Created
February 23, 2023 13:02
-
-
Save GHGHGHKO/79d5e3a373b691e2ea7a4153cb269b50 to your computer and use it in GitHub Desktop.
ExceptionAdvice accessDeniedException
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
| @ExceptionHandler(value = [AccessDeniedException::class]) | |
| fun accessDeniedException(): ResponseEntity<CommonResult> { | |
| return ResponseEntity | |
| .status(HttpStatus.FORBIDDEN) | |
| .body(responseService.failResult( | |
| getMessage("accessDenied.code").toInt(), | |
| getMessage("accessDenied.message"))) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment