Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

aspectj after returning

@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) { ... }
}
Source by howtodoinjava.com #
 
PREVIOUS NEXT
Tagged: #aspectj #returning
ADD COMMENT
Topic
Name
6+6 =