0
votes

i'm new to the aop programming and i have a big issue with @Around advice. I've a maven project with - aspectjrt and aspectjweaver 1.7.1 - spring 3.2.0

According with official guide (http://static.springsource.org/sprin.../html/aop.html) i've inserted to my applicationContext and an example aspect

If i try @AfterReturning @Before @After @AfterTrowing with a specified @Pointcut all go ok, but if i use @Around advice not working.

This is the pointcut and it's around advice

@Pointcut("execution(*PersonDbService.findPersonDiplomatici(..))")
private void dbFindOperationNoArgs() {}

@Around("dbFindOperationNoArgs()")
    public Object aroundAdv(ProceedingJoinPoint joinPoint) throws Throwable {
              // start stopwatch
          Object retVal = joinPoint.proceed();
          // stop stopwatch
          return retVal;
    }

It's very strange for me because all other advice annotation work

1

1 Answers

0
votes

try "call" instead of "execution"