Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hello;
- import org.aspectj.lang.annotation.Aspect;
- import org.aspectj.lang.annotation.Before;
- import org.aspectj.lang.annotation.Pointcut;
- @Aspect
- public class SomeAspect {
- @Pointcut("execution(* GreetingController.greeting(..))")
- public void greeting() { }
- @Before("greeting()")
- public void beforeGreeting() {
- System.out.println("HI FROM ASPECT");
- }
- }
Add Comment
Please, Sign In to add comment