@RestControllerAdvice public class SecurityGlobalExceptionHandler extends Object
Description: 统一异常处理器
| 构造器和说明 |
|---|
SecurityGlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
static cn.herodotus.engine.assistant.core.domain.Result<String> |
authenticationException(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
统一异常处理
AuthenticationException
|
static cn.herodotus.engine.assistant.core.domain.Result<String> |
exception(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static cn.herodotus.engine.assistant.core.domain.Result<String> |
oAuth2AuthenticationException(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static cn.herodotus.engine.assistant.core.domain.Result<String> |
resolveException(Exception ex,
String path) |
static cn.herodotus.engine.assistant.core.domain.Result<String> |
resolveSecurityException(Exception exception,
String path)
静态解析认证异常
|
static cn.herodotus.engine.assistant.core.domain.Result<String> |
restTemplateException(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Rest Template 错误处理
|
static cn.herodotus.engine.assistant.core.domain.Result<String> |
validationBindException(org.springframework.validation.BindException ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static cn.herodotus.engine.assistant.core.domain.Result<String> |
validationMethodArgumentException(org.springframework.web.bind.MethodArgumentNotValidException ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
@ExceptionHandler(value={org.springframework.web.client.HttpClientErrorException.class,org.springframework.web.client.HttpServerErrorException.class})
public static cn.herodotus.engine.assistant.core.domain.Result<String> restTemplateException(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
ex - 错误request - 请求response - 响应@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public static cn.herodotus.engine.assistant.core.domain.Result<String> validationMethodArgumentException(org.springframework.web.bind.MethodArgumentNotValidException ex, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value=org.springframework.validation.BindException.class) public static cn.herodotus.engine.assistant.core.domain.Result<String> validationBindException(org.springframework.validation.BindException ex, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value={org.springframework.security.core.AuthenticationException.class,PlatformAuthenticationException.class})
public static cn.herodotus.engine.assistant.core.domain.Result<String> authenticationException(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
ex - 错误request - 请求response - 响应@ExceptionHandler(value=org.springframework.security.oauth2.core.OAuth2AuthenticationException.class) public static cn.herodotus.engine.assistant.core.domain.Result<String> oAuth2AuthenticationException(Exception ex, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
@ExceptionHandler(value={java.lang.Exception.class,cn.herodotus.engine.assistant.core.exception.PlatformException.class})
public static cn.herodotus.engine.assistant.core.domain.Result<String> exception(Exception ex,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public static cn.herodotus.engine.assistant.core.domain.Result<String> resolveException(Exception ex, String path)
Copyright © 2022. All rights reserved.