Arthas利用Spring容器獲取對象 調(diào)用實例方法 線上問題排查Tips

啟動arthas

java -jar arthas-boot.jar

啟動Arthas

記錄RequestMappingHandlerAdapter#invokeHandlerMethod的請求财喳,獲取index

tt -t org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter invokeHandlerMethod

invokeHandlerMethod請求index

獲取SpringContext

tt -i 第二步的index -w '
#ac=target.getApplicationContext()
'

此處''中的語法為OGNL科侈,詳細(xì)指南:http://commons.apache.org/proper/commons-ognl/language-guide.html

通過SpringContext獲取Spring容器中任意一個Component

tt -i 第二步的index -w '
#ac=target.getApplicationContext(),
#orderDomainService=#ac.getBean("orderDomainServiceImpl"),
#subOrderEntityRepository=#ac.getBean("subOrderEntityRepository"),
#order=#orderDomainService.doMethod("指定子訂單號"),
#subOrderEntity=#order.getSubOrderEntityList().get(0),
#requestJson=@com.poizon.fusion.utils.JsonUtils@serialize(#subOrderEntity)'

運行結(jié)果:

{
    "id":410,
    "orderNo":"510100016560346748",
    "subOrderNo":"110100016560356748",
    "bizType":"CONSIGN",
    "bizCode":"duapp.general",
    "bizChannel":"",
    "bizId":"",
    "status":"TRADE_SUCCESS",
    "buyerInfo":{
        "userId":45816748,
        "userName":"慈祥噴泡zFJ"
    },
    "sellerInfo":{
        "userId":10029,
        "userName":"我手機(jī)三腳架"
    },
    "productPrice":13900,
    "freightPrice":1400,
    "payAmount":15300,
    "discountAmount":0,
    "depositAmount":2800,
    "poundageAmount":3648,
    "count":1,
    "freightInfo":{
        "freight":1400,
        "freightGray":false
    },
    "buyerLogisticEntity":{
        "id":431,
        "logisticNo":"EX1010007132106748",
        "logisticStage":3,
        "orderNo":"510100016560346748",
        "subOrderNo":"110100016560356748",
        "buyerId":45816748,
        "expressType":"SF",
        "expressNo":"SF773278234517",
        "expressStatus":20,
        "senderAddress":"上海上海市虹口區(qū)互聯(lián)寶地",
        "receiverAddress":"江蘇省南京市玄武區(qū)互聯(lián)寶地",
        "senderMobile":"1231232435435",
        "receiverMobile":"17612160914",
        "feature":"{"receiptStatus":true,"signTime":"2021-03-07 10:50:59","sendTime":"2021-02-28 10:50:59"}",
        "logisticFeature":{
            "receiptStatus":true,
            "signTime":"2021-03-07 10:50:59",
            "sendTime":"2021-02-28 10:50:59"
        },
        "createTime":"2021-02-28 10:50:52.000",
        "modifyTime":"2021-03-07 10:50:59.225"
    },
    "inventoryNo":"SN109615732",
    "skuId":324537,
    "buyerNote":"",
    "sellerNote":"",
    "buyerDel":0,
    "subOrderCloseTime":"2021-02-28 10:50:52.611",
    "paidTime":"2021-02-28 10:50:54.485",
    "createTime":"2021-02-28 10:50:52.000",
    "modifyTime":"2021-03-07 10:50:59.212",
    "roundId":0,
    "buyerAddressId":0,
    "discountInfos":[

    ],
    "useRedPacket":false,
    "useAllowance":false,
    "productId":55,
    "productInfo":{
        "skuId":324537,
        "skuPic":"[https://cdn.poizon.com/source-img/origin-img/20201210/105c1de1fec844038f07f42e7eeea50c.jpg](https://cdn.poizon.com/source-img/origin-img/20201210/105c1de1fec844038f07f42e7eeea50c.jpg)",
        "skuCategory":38,
        "skuTitle":"打折Nike Dunk Low Premiun SB QS 北京",
        "spuId":55,
        "spuTitle":"打折Nike Dunk Low Premiun SB QS 北京",
        "skuProp":{
            "6":"35.5"
        },
        "skuTagType":5,
        "signupPrice":0,
        "authPrice":5800,
        "articleNumber":"504750-077",
        "otherNumbers":"",
        "preSellDeliverTime":0,
        "isSelf":0,
        "sellLimitPurchase":0,
        "preSellLimitPurchase":1,
        "level1CategoryId":29,
        "level2CategoryId":35,
        "categoryTag":"{"PAYMENT":["PAYMENT_HUABEI","PAYMENT_HUABEI_STAGING"]}",
        "goodsType":0,
        "brandId":144,
        "relationBrandIds":"",
        "fitId":1,
        "receiveMinTime":2,
        "receiveMaxTime":2,
        "saleAfterFlag":0,
        "unconditionalReturn":0,
        "size":"35.5",
        "self":false
    },
    "sellerAddressInfo":{
        "userId":10029,
        "zipCode":""
    },
    "repositoryAddress":{
        "userAddressId":3,
        "province":"上海",
        "city":"上海市",
        "district":"虹口區(qū)",
        "address":"互聯(lián)寶地",
        "addressDetail":"上海上海市虹口區(qū)互聯(lián)寶地",
        "mobile":"1231232435435",
        "name":"得物白冰冰",
        "warehouseAddressType":"VIRTUAL",
        "zipCode":"",
        "warehouseCode":"SH12",
        "warehouseZoneCode":"YQSH01"
    },
    "buyerAddressInfo":{
        "userAddressId":1010004160,
        "userId":45816748,
        "province":"江蘇省",
        "city":"南京市",
        "district":"玄武區(qū)",
        "address":"互聯(lián)寶地",
        "addressDetail":"江蘇省南京市玄武區(qū)互聯(lián)寶地",
        "mobile":"17612160914",
        "name":"紅包吧v",
        "countryCode":"",
        "modifyTimes":0,
        "zipCode":"",
        "optionalAddress":"",
        "userMobile":"11122221604",
        "hasSelfBuy":false,
        "hasCheck":true,
        "realReceiveSmsMobile":"17612160914"
    },
    "sellerBackAddressInfo":{
        "userAddressId":1010004113,
        "userId":10029,
        "province":"浙江省",
        "city":"杭州市",
        "district":"西湖區(qū)",
        "address":"尷尬vv",
        "addressDetail":"浙江省杭州市西湖區(qū)尷尬vv",
        "mobile":"15618153285",
        "name":"溝溝壑壑",
        "countryCode":"",
        "modifyTimes":0,
        "zipCode":"",
        "optionalAddress":""
    },
    "poundageInfo":{
        "poundageInfoList":[
            {
                "expenseType":1,
                "expenseName":"技術(shù)服務(wù)費",
                "originalExpense":209,
                "currentExpense":209,
                "originalPercent":150,
                "currentPercent":150,
                "extendJson":"{"currentPercent":150,"currentexpense":209,"expenseLimit":{"max":24900,"min":0},"originalTechnicalFeeLimit":{"expenseLimit":{"max":24900,"min":0},"originalExpense":209,"originalPercent":150}}"
            },
            {
                "expenseType":3,
                "expenseName":"轉(zhuǎn)賬手續(xù)費",
                "originalExpense":139,
                "currentExpense":139,
                "originalPercent":100,
                "currentPercent":100,
                "extendJson":"{"currentExpense":139,"currentPercent":100,"originalExpense":139,"originalPercent":100}"
            },
            {
                "expenseType":5,
                "expenseName":"查驗費",
                "originalExpense":800,
                "currentExpense":800,
                "extendJson":"{"currentExpense":800,"originalExpense":800}"
            },
            {
                "expenseType":2,
                "expenseName":"鑒別費",
                "originalExpense":1500,
                "currentExpense":1500,
                "extendJson":"{"currentExpense":1500,"originalExpense":1500}"
            },
            {
                "expenseType":4,
                "expenseName":"包裝服務(wù)費",
                "originalExpense":1000,
                "currentExpense":1000,
                "extendJson":"{"currentExpense":1000,"originalExpense":1000}"
            },
            {
                "expenseType":7,
                "expenseName":"預(yù)計收入",
                "originalExpense":10252,
                "currentExpense":10252
            },
            {
                "expenseType":6,
                "expenseName":"總費用",
                "originalExpense":3648,
                "currentExpense":3648
            }
        ],
        "version":"1.0.0",
        "totalAmount":3648,
        "poundageAmount":209
    },
    "inventoryInfo":{
        "saleInventoryNo":"SN109615732",
        "skuId":324537,
        "uid":10029,
        "price":13900,
        "biddingType":5,
        "deposit":2800,
        "prepaidFee":1390,
        "currency":"CNY",
        "countryCode":"CN",
        "deliveryCountryCode":"CN",
        "childSubBiddingType":0,
        "sellerBiddingNo":"102020031000861366",
        "createTime":1614480650,
        "modifyTime":1614480651,
        "deliveryTime":3600,
        "receiveMinTime":2,
        "receiveMaxTime":2,
        "orginInvenNo":"SN109615732",
        "sourceType":"poizon",
        "sourceId":"",
        "warehouseZoneCode":"YQSH01"
    },
    "depositInfo":{
        "prepaidFee":1390,
        "childSubBiddingType":0,
        "applyNo":"AP1010009479911",
        "applyItemNo":"JS002916000007166469",
        "jsType":3
    },
    "preferentialInfo":{
        "buyerShowDiscountList":[

        ],
        "discountList":[

        ],
        "needRecommend":false,
        "freightNeedRecommend":false,
        "oldPreferentialList":[

        ]
    },
    "merchantInfo":{
        "merchantId":318741,
        "typeId":0,
        "userId":10029,
        "username":"翟天凡",
        "realName":"翟天凡",
        "idCardNo":"320*************18",
        "mobile":"11166668888",
        "balanceType":0,
        "isUnconditionalReturn":1,
        "isUnconditionalReturnByMerchant":1,
        "status":1,
        "adminUserId":0,
        "merchantIdCard":"PBDR20081180645956",
        "isInvoice":0,
        "skipCheck":false,
        "poundageDiscount":-2
    },
    "downPaymentInfo":{
        "promotionNo":"-1",
        "skipCheck":false
    },
    "qualityEntity":{
        "id":287,
        "orderNo":"510100016560346748",
        "subOrderNo":"110100016560356748",
        "buyerId":45816748,
        "spuId":324537,
        "skuId":324537,
        "qcId":0,
        "qcResultType":0,
        "qcResultDesc":"質(zhì)檢通過",
        "qcResultPics":"",
        "confirmStatus":0,
        "createTime":"2021-02-28 10:50:52.000",
        "modifyTime":"2021-02-28 10:50:52.000",
        "qualityPassedTime":"2021-02-28 10:50:59.000",
        "qualityBeginTime":"2021-02-28 10:50:52.621",
        "feature":"{}",
        "qualityFeature":{

        }
    },
    "identifyEntity":{
        "id":287,
        "orderNo":"510100016560346748",
        "subOrderNo":"110100016560356748",
        "spuId":324537,
        "skuId":324537,
        "buyerId":45816748,
        "identifyId":0,
        "identifyResultType":1,
        "identifyResultDesc":"鑒別為真",
        "createTime":"2021-02-28 10:50:52.000",
        "modifyTime":"2021-02-28 10:50:52.000",
        "feature":""
    },
    "evaluationFlag":"NO",
    "isSelf":0,
    "deliveryStartTime":"2021-02-28 10:51:54.675",
    "deliveryDeadline":"2021-02-28 11:50:55.000",
    "tabTag":0,
    "appType":0,
    "agreeSevenDayWithoutReason":false,
    "orderFlag":0,
    "relationSubOrderList":[

    ],
    "commentList":[

    ],
    "agreedAutoExchange":false,
    "sevenDayNoReasonStatus":false,
    "warehousing":false,
    "liveFlag":"NO",
    "skipCheckFlag":"NO",
    "autoExchangeSwitch":false,
    "freightInsuranceChecked":false,
    "subsidyMap":{
        "-1":0
    },
    "crossBorderPostType":0,
    "tradeSuccessTime":"2021-03-07 10:50:59.194",
    "biddingAfterSaleInfo":{
        "sellerBiddingNo":"102020031000861366",
        "afterSalesType":0
    },
    "additionBiddingAfterSaleInfo":[

    ],
    "bizInstanceId":{
        "bizCode":"duapp.general",
        "bizInstanceId":"510100016560346748"
    },
    "unconditionalReturnInBuyerVersion":false,
    "unconditionalReturnInSellerVersion":false
}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末涛舍,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子稠炬,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,590評論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件狈癞,死亡現(xiàn)場離奇詭異,居然都是意外死亡茂契,警方通過查閱死者的電腦和手機(jī)蝶桶,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,157評論 3 399
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來掉冶,“玉大人真竖,你說我怎么就攤上這事⊙嵝。” “怎么了恢共?”我有些...
    開封第一講書人閱讀 169,301評論 0 362
  • 文/不壞的土叔 我叫張陵,是天一觀的道長璧亚。 經(jīng)常有香客問我讨韭,道長,這世上最難降的妖魔是什么癣蟋? 我笑而不...
    開封第一講書人閱讀 60,078評論 1 300
  • 正文 為了忘掉前任透硝,我火速辦了婚禮,結(jié)果婚禮上疯搅,老公的妹妹穿的比我還像新娘濒生。我一直安慰自己,他們只是感情好幔欧,可當(dāng)我...
    茶點故事閱讀 69,082評論 6 398
  • 文/花漫 我一把揭開白布罪治。 她就那樣靜靜地躺著,像睡著了一般琐馆。 火紅的嫁衣襯著肌膚如雪规阀。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,682評論 1 312
  • 那天瘦麸,我揣著相機(jī)與錄音谁撼,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛厉碟,可吹牛的內(nèi)容都是我干的喊巍。 我是一名探鬼主播,決...
    沈念sama閱讀 41,155評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼箍鼓,長吁一口氣:“原來是場噩夢啊……” “哼崭参!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起款咖,我...
    開封第一講書人閱讀 40,098評論 0 277
  • 序言:老撾萬榮一對情侶失蹤何暮,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后铐殃,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體海洼,經(jīng)...
    沈念sama閱讀 46,638評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,701評論 3 342
  • 正文 我和宋清朗相戀三年富腊,在試婚紗的時候發(fā)現(xiàn)自己被綠了坏逢。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,852評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡赘被,死狀恐怖是整,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情民假,我是刑警寧澤浮入,帶...
    沈念sama閱讀 36,520評論 5 351
  • 正文 年R本政府宣布,位于F島的核電站羊异,受9級特大地震影響舵盈,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜球化,卻給世界環(huán)境...
    茶點故事閱讀 42,181評論 3 335
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望瓦糟。 院中可真熱鬧筒愚,春花似錦、人聲如沸菩浙。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,674評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽劲蜻。三九已至陆淀,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間先嬉,已是汗流浹背轧苫。 一陣腳步聲響...
    開封第一講書人閱讀 33,788評論 1 274
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留疫蔓,地道東北人含懊。 一個月前我還...
    沈念sama閱讀 49,279評論 3 379
  • 正文 我出身青樓身冬,卻偏偏與公主長得像,于是被迫代替她去往敵國和親岔乔。 傳聞我的和親對象是個殘疾皇子酥筝,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,851評論 2 361

推薦閱讀更多精彩內(nèi)容