arthas 生成运行时的方法请求与响应参数

 

 请求格式

watch 类 方法 '{params, returnObj, throwExp}' -n 5 -x 3

其中参数说明:

params是参数列表,是一个数组,可以直接通过下标方式访问

returnObj 返回的结果
throwExp 抛出的异常,如果有那么也打印出来

-n代表只输出一次

-x 3 深度 ,不写的情况下默认为1

 

例如

watch com.chenweixian.remote.InfoRemote tradedUser '{params, returnObj, throwExp}' -n 5 -x 3

 

输出结果

从结果中可以看到请求的是一个类

BaseRequest包含

TradedUserReq ,其中的参数customerIds,值是60888, 20108, 20106,

返回的是一个对象

BaseResponse
ts=2022-12-02 15:22:31; [cost=481.788998ms] result=@ArrayList[
    @Object[][
        @BaseRequest[
            system=@String[ccjr-business-biz],
            data=@TradedUserReq[TradedUserReq(customerIds=[60888, 20108, 20106])],
        ],
    ],
    @BaseResponse[
        code=@Integer[10000],
        msg=@String[请求成功],
        codeArgs=@Object[][isEmpty=true;size=0],
        system=@String[ccjr-option-biz],
        data=@TradedUserRes[
            result=@LinkedHashMap[isEmpty=false;size=165],
        ],
    ],
    null,
]

 

其中的参数

posted on 2022-12-02 15:41  陈惟鲜的博客  阅读(591)  评论(0编辑  收藏  举报

导航