从其他模块调用方法时的建议

| 我有三个不同的Maven模块: 包含注释和Aspect的security-api。 用来自“ security-api \”的烤箱类编译的模块。 客户端通过API从“模块”中调用带注释的方法。 一切都将在同一个JVM中运行。 从“模块”
@Authorization
public String getString(Subject s) {
  return \"hello\";
}
\“ security-api \”中的方面
@Aspect
public class AuthorizationAspect {
    @Pointcut(\"\"
    + \"execution(* *(org.apache.shiro.subject.Subject, ..)) && \"
    + \"@annotation(com.company.Authorization) && \"
    + \"@this(c)\")
    public void cutAuthorize(Authorization c) { }

    @Before(\"cutAuthorize(c)\")
    public void callFromAuthorizeBefore(Authorization c) {
        System.out.println(\"> \" + c);
    }
}
所以,我想要的是当我从其他模块调用getString(subject)时,我想运行cutAuthorize()。我可以执行此操作来指定调用切入点,但是只有在调用发生在同一模块中时,才会被捕获,例如,如果我在\“ module \”中调用带注释的方法,则一切正常,但是由于我是通过其他方法进行调用通知未运行的接口。 任何人都知道我必须使用什么切入点才能在运行时(而不是在调用时)建议一些代码?我不知道自己是否要说清楚,但是我想做的事情有点难以解释。 提前致谢, 瑞     
已邀请:
        您需要将安全模型注册为Aspectj编译器的方面库,仅此而已。     

要回复问题请先登录注册