MethodInterceptor

方法拦截器,也就是aop拦截方法

 

1.使用示例

public interface MethodInterceptor extends Interceptor {
      Object invoke(MethodInvocation invocation) throws Throwable;
}

只有一个方法invoke方法,这里和java web的过滤器很相像

Object ret = invocation.proceed();

在这个方法的前后加上逻辑,就是方法前和方法后需要执行的逻辑

相关文章:

  • 2022-02-21
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案