2013-01-22 67 views
0

我是新來的aop編程,我有@Around建議的大問題。 我有一個Maven項目與 - aspectjrt和aspectjweaver 1.7.1 - 春天3.2.0@周建議不工作春天aspectj

官方指南(http://static.springsource.org/sprin.../html/aop根據。 html)我已經插入到我的應用程序上下文和一個示例方面

如果我嘗試@AfterReturning @Before @After @AfterTrowing與指定的@Pointcut一切順利,但如果我使用@Around建議不工作。

這是切入點,它的周圍建議

@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; 
    } 

這是非常奇怪的我,因爲所有其他的建議註釋工作

回答

0

嘗試「呼叫」,而不是「執行」