AspectJ: @AfterReturning

匿名 (未验证) 提交于 2019-12-03 01:00:01

问题:

I've created this pointcut:

@Pointcut("execution(* com.living.commty.boot.resources.*.* (..))") public void resourcesCut() {}

I'm trying to get the return value after having been returned:

@AfterReturning(pointcut="resourcesCut()", returning="result") public void afterReturning(JoinPoint joinPoint, Object result) {     //... }

The problem is that it's cutting only 6 advises. However, if I not set returning:

@AfterReturning(pointcut="resourcesCut()") public void afterReturning(JoinPoint joinPoint) {     this.logAfterReturningTrace(joinPoint, null); }

it's cutting up to 39 advises.

What am I doing wrong?

I'm trying to get all returned values of any "resourcesCut" pointcut execution methods...

转载请标明出处:AspectJ: @AfterReturning
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!