美文网首页
获取http调用中被调用的方法名

获取http调用中被调用的方法名

作者: cjsssss | 来源:发表于2017-11-30 14:53 被阅读0次

    StackTraceElement[] stackTrace =Thread.currentThread().getStackTrace();

    String methodName ="unknow";

    if(stackTrace!=null&& stackTrace.length>=3){

    methodName = stackTrace[2].getMethodName();

    }

    methodName:被调用的方法名

    相关文章

      网友评论

          本文标题:获取http调用中被调用的方法名

          本文链接:https://www.haomeiwen.com/subject/iypvbxtx.html