私は aop プログラミングが初めてで、@Around のアドバイスに大きな問題があります。私はMavenプロジェクトを持っています-aspectjrtとaspectjweaver 1.7.1-春3.2.0
公式ガイド (http://static.springsource.org/sprin.../html/aop.html) に従って、私は自分の applicationContext と例のアスペクトに挿入しました
指定された @Pointcut で @AfterReturning @Before @After @AfterTrowing を試してみると、すべて問題ありませんが、@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;
}
他のすべてのアドバイス注釈が機能するため、私にとっては非常に奇妙です