Interface ExceptionMapper<T extends Exception>
- Type Parameters:
T- 支援的異常類型
- All Known Implementing Classes:
ApplicationExceptionMapper, DataAccessExceptionMapper, HttpMessageConversionExceptionMapper, LockoutExceptionMapper, TransactionExceptionMapper, ValidationExceptionMapper
public interface ExceptionMapper<T extends Exception>
異常映射策略接口
負責將特定類型的異常轉換為 RFC 7807 ProblemDetail。
- See Also:
-
Method Summary
-
Method Details
-
supports
檢查此 Mapper 是否支援給定的異常- Parameters:
exception- 待檢查的異常- Returns:
- true 如果支援,否則 false
-
map
將異常轉換為 ProblemDetail (RFC 7807)- Parameters:
exception- 待轉換的異常- Returns:
- ProblemDetail 錯誤回應物件
-