@ControllerAdvice public class BaseExceptionAdvice extends Object
| 构造器和说明 |
|---|
BaseExceptionAdvice() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<ExceptionResult> |
handleException(SnowException e)
自定义异常处理方案
|
org.springframework.http.ResponseEntity<ExceptionResult> |
handleNoHandlerFoundException(org.springframework.web.HttpRequestMethodNotSupportedException e)
全局405异常捕获
|
org.springframework.http.ResponseEntity<ExceptionResult> |
handleNoHandlerFoundException(org.springframework.web.servlet.NoHandlerFoundException e)
全局404异常捕获
|
org.springframework.http.ResponseEntity<ExceptionResult> |
handleRuntimeException(RuntimeException e)
运行时异常处理方案
|
org.springframework.http.ResponseEntity<ExceptionResult> |
InternalAuthenticationServiceException(org.springframework.security.authentication.InternalAuthenticationServiceException e)
InternalAuthenticationServiceException异常
|
@ExceptionHandler(value=java.lang.RuntimeException.class) public org.springframework.http.ResponseEntity<ExceptionResult> handleRuntimeException(RuntimeException e)
e - @ExceptionHandler(value=SnowException.class) public org.springframework.http.ResponseEntity<ExceptionResult> handleException(SnowException e)
e - @ExceptionHandler(value=org.springframework.web.servlet.NoHandlerFoundException.class) public org.springframework.http.ResponseEntity<ExceptionResult> handleNoHandlerFoundException(org.springframework.web.servlet.NoHandlerFoundException e)
e - @ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) public org.springframework.http.ResponseEntity<ExceptionResult> handleNoHandlerFoundException(org.springframework.web.HttpRequestMethodNotSupportedException e)
e - @ExceptionHandler(value=org.springframework.security.authentication.InternalAuthenticationServiceException.class) public org.springframework.http.ResponseEntity<ExceptionResult> InternalAuthenticationServiceException(org.springframework.security.authentication.InternalAuthenticationServiceException e)
Copyright © 2023. All rights reserved.