Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. package com.pig.spring.springaop.springaop.aspect;
  2.  
  3. import org.aspectj.lang.JoinPoint;
  4. import org.aspectj.lang.annotation.AfterReturning;
  5. import org.aspectj.lang.annotation.Aspect;
  6. import org.slf4j.Logger;
  7. import org.slf4j.LoggerFactory;
  8. import org.springframework.context.annotation.Configuration;
  9.  
  10. @Aspect
  11. @Configuration
  12. public class AfterAOPAspect {
  13.  
  14. private Logger logger = LoggerFactory.getLogger(this.getClass());
  15.  
  16. @AfterReturning(value =
  17. "execution(* com.pig.spring.springaop.springaop.business.*.*(..))"
  18. ,returning = "result")
  19. public void afterReturning123(JoinPoint joinPoint,Object result) {
  20. logger.info("{} returned with value {}",joinPoint,result);
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement