I'm trying to create a pointcut on Spring JDBC classes.. specifically those that implement JdbcOperations.
Then I try some around advice.Code:@Pointcut("execution(* org.springframework.jdbc.core.JdbcOperations.*(..))") public void jdbcMethods() {}
But it doesn't work. If I switch the pointcut expression to one of my own interfaces, it works as intended. What is wrong here?Code:@Around("jdbcMethods()") public Object time(ProceedingJoinPoint pjp) throws Throwable { long start = System.currentTimeMillis(); Object obj = pjp.proceed(); long time = System.currentTimeMillis() - start; System.out.println(pjp.getSignature().getName() +" took "+ time +"ms"); return obj; }


Reply With Quote