使用 SPEL 调用同一类中的方法,传递取自实际方法的变量

Pha*_*ate 5 spring aspectj spring-el spring-boot

我希望能够通过传递调用方法的参数值来调用类的另一个方法,所以假设:

public class MyClass{

   @MySpelAnnotation("#this.otherMethod()") //how to I pass "arg" as parameter?
   public void mainMethod(String arg){
        ...
   }

   public void otherMethod(String arg){

   }
Run Code Online (Sandbox Code Playgroud)

我怎样才能从第一个方法中获取 arg 并将其传递给第二个方法?