public class CustomWebResponseExceptionTranslator extends Object implements org.springframework.security.oauth2.provider.error.WebResponseExceptionTranslator<org.springframework.security.oauth2.common.exceptions.OAuth2Exception>
| 构造器和说明 |
|---|
CustomWebResponseExceptionTranslator() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
设置异常分析器
|
org.springframework.http.ResponseEntity<org.springframework.security.oauth2.common.exceptions.OAuth2Exception> |
translate(Exception e)
转换异常为OAuth2异常响应 根据异常类型转换为对应的OAuth2异常
|
public org.springframework.http.ResponseEntity<org.springframework.security.oauth2.common.exceptions.OAuth2Exception> translate(Exception e) throws Exception
translate 在接口中 org.springframework.security.oauth2.provider.error.WebResponseExceptionTranslator<org.springframework.security.oauth2.common.exceptions.OAuth2Exception>e - 原始异常Exception - 当转换过程中发生错误时抛出public void setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
throwableAnalyzer - 异常分析器Copyright © 2025. All rights reserved.