웹 & 프레임워크

포인트컷 이용방법

늘근이 2014. 5. 25. 22:50

@Pointcut("execution(* com.gorakgarak..*(java.lang.String))")

                  private void allPointCut(){

                                  

                  }

                 

                 

                  @Before(value="allPointcut()")

                  public void beforeLogging(JoinPoint joinPoint){

                                   System.out.println(joinPoint.getSignature().getName() + "메소드 호출  :" +

                                                                       joinPoint.getArgs()[0]);

                  }