类 GlobalExceptionHandler


  • @Order(2)
    @RestControllerAdvice
    public class GlobalExceptionHandler
    extends java.lang.Object
    全 局 异 常 处 理
    作者:
    youta
    • 构造器详细资料

      • GlobalExceptionHandler

        public GlobalExceptionHandler()
    • 方法详细资料

      • handleException

        @ExceptionHandler(org.springframework.web.HttpRequestMethodNotSupportedException.class)
        public Result<?> handleException​(org.springframework.web.HttpRequestMethodNotSupportedException e)
        不 支 持 的 请 求 类 型
        参数:
        e - exception
        返回:
        Result
      • notFount

        @ExceptionHandler(java.lang.RuntimeException.class)
        public Result<?> notFount​(java.lang.RuntimeException e)
        未 知 的 运 行 时 异 常
        参数:
        e - exception
        返回:
        Result
      • notColumn

        @ExceptionHandler(java.sql.SQLSyntaxErrorException.class)
        public Result<?> notColumn​(java.lang.RuntimeException e)
        未 知 的 运 行 时 异 常
        参数:
        e - exception
        返回:
        Result
      • handleException

        @ExceptionHandler(java.lang.Exception.class)
        public Result<?> handleException​(java.lang.Exception e)
        系 统 异 常
        参数:
        e - exception
        返回:
        Result