@Around用法

    @Around(value = "pointcut()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
    
return joinPoint.proceed();
    }

 

@AfterThrowing用法

 

//pointcut()为注册的切入点方法
    @AfterThrowing(pointcut = "pointcut()", throwing = "ex")
    public void afterThrow(JoinPoint joinPoint, Exception ex) {
        String name = joinPoint.getSignature().getName();
        log.info(name + "异常:" + "\t" + ex.getMessage());

 

相关文章:

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