Class ErrorAdvice

java.lang.Object
org.miaixz.bus.core.basic.advice.ErrorAdvice

public class ErrorAdvice extends Object
异常信息处理
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    业务处理器处理请求之前被调用,对用户的request进行处理,若返回值为true, 则继续调用后续的拦截器和目标方法;若返回值为false, 则终止请求 这里可以加上登录校验,权限拦截、请求限流等

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ErrorAdvice

      public ErrorAdvice()
  • Method Details

    • handler

      public boolean handler(Exception ex)
      业务处理器处理请求之前被调用,对用户的request进行处理,若返回值为true, 则继续调用后续的拦截器和目标方法;若返回值为false, 则终止请求 这里可以加上登录校验,权限拦截、请求限流等
      Parameters:
      ex - 对象参数
      Returns:
      如果执行链应该继续执行, 则为:true 否则:false