spring aop环绕通知


    
    
        
            
            
        
    
 public Object around(ProceedingJoinPoint joinPoint){
        Object[] args = joinPoint.getArgs();
        Object proceed = null;
        try {
            System.out.println("around前置通知");
            proceed = joinPoint.proceed(args);
            System.out.println("后置");
        } catch (Throwable throwable) {
            System.out.println("异常");
            throwable.printStackTrace();
        }finally {
            System.out.println("最终");
        }
        return proceed;
    }

你可能感兴趣的:(spring aop环绕通知)