Guest User

Untitled

a guest
Sep 4th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. package hello;
  2.  
  3. import org.aspectj.lang.annotation.Aspect;
  4. import org.aspectj.lang.annotation.Before;
  5. import org.aspectj.lang.annotation.Pointcut;
  6.  
  7. @Aspect
  8. public class SomeAspect {
  9.  
  10.     @Pointcut("execution(* GreetingController.greeting(..))")
  11.     public void greeting() { }
  12.  
  13.     @Before("greeting()")
  14.     public void beforeGreeting() {
  15.         System.out.println("HI FROM ASPECT");
  16.     }
  17. }
Add Comment
Please, Sign In to add comment