1
我有下面这段代码在我LoggingAspect类,我希望这对我的方法,如我@Around的建议没有被要求在包装
gov.ssa.rome.service运行的所有方法。 impl.save() gov.ssa.rome.dao.impl.save()
但无论如何它只运行一次。我不知道为什么。我已经使用autowire将dao连接到servcice层。我非常感谢你的帮助。
我应该怎样做才能让这个方法运行在我所有的应用程序流中才能看到日志中的流?
@Around("execution(* gov.ssa.rome..*.*(..))")
public Object log(ProceedingJoinPoint pjp) throws Throwable {
System.out.println("aspect Around started");
Object ret = pjp.proceed();
System.out.println("aspect Around ended);
return ret;
}