Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 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.Aspect;
  5. import org.aspectj.lang.annotation.Before;
  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 UserAccessAspect {
  13.  
  14. private Logger logger = LoggerFactory.getLogger(this.getClass());
  15. //What kind of method calls I would intercept
  16. //execution(* PACKAGE.*.*(..))
  17.  
  18. @Before("com.pig.spring.springaop.springaop.aspect.CommonJoinPointConfig.dataLayerExecution()")
  19. public void before(JoinPoint joinPoint) {
  20. logger.info(" Check For User Access ");
  21. logger.info(" Allow execution For {}",joinPoint);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement