Spring AOP-@doAround学习

2022-07-01 12:17:32
@Around("controllerAspect()")
	 public Object doAround(ProceedingJoinPoint joinPoint) {
		 Object result = null;
		 try {
			 result = joinPoint.proceed();
		 } catch (Throwable e) {
			e.printStackTrace();
		 }
		 return result;
	 }


@Around是可以同时在所拦截方法的前后执行一段逻辑

返回值为Object 即切面方法返回值为Object

参数为 ProceedingJoinPoint

joinPoint.proceed()为切面方法的执行

  • 作者:严_同学
  • 原文链接:https://blog.csdn.net/shangshanling/article/details/53942526
    更新时间:2022-07-01 12:17:32