access class variable in aspect class

前端 未结 3 2215
迷失自我
迷失自我 2021-01-02 12:36

i am creating an aspect class with spring aspectj as follow

@Aspect
public class AspectDemo {
  @Pointcut(\"execution(* abc.execute(..))\")
     public void          


        
3条回答
  •  无人及你
    2021-01-02 12:48

    If you are using Spring then you could use the AOPUtils helper class

     public Object invoke(MethodInvocation invocation) throws Throwable
     {
          Class targetClass = AopUtils.getTargetClass(invocation.getThis())
     }
    

提交回复
热议问题