📜  返回后的aspectj - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:05.861000             🧑  作者: Mango

代码示例1
@Aspect
public class LoggingAspect {
 
    @AfterReturning("execution(* com.howtodoinjava.app.service.impl.EmployeeManagerImpl.*(..))")
    public void logAroundAllMethods() { ... }
 
    @AfterReturning(pointcut="execution(* com.howtodoinjava.app.service.impl.EmployeeManagerImpl.getEmployeeById(..))", returning="retVal") 
    public void logAroundGetEmployee(Object retVal) { ... }
}