RpcServiceContext上下文

消費者: web?

提供者: buss-service

同一服務器:?192.168.100.228

RpcServiceContext serviceContext = RpcContext.getServiceContext();
//web->buss-serviceLOGGER.warn("getRequest->{}", JsonUtil.toJson(serviceContext.getRequest()));
//getRequest->null
LOGGER.warn("getResponse->{}", JsonUtil.toJson(serviceContext.getResponse()));
//getResponse->null
LOGGER.warn("get->{}", JsonUtil.toJson(serviceContext.get()));
//get->{}
LOGGER.warn("getAttachments->{}", JsonUtil.toJson(serviceContext.getAttachments()));
//getAttachments->{"traceId":"aaef470a3a164379b4f12517f743f5d6","input":"392","remote.application":"web"}
LOGGER.warn("getInterfaceName->{}", JsonUtil.toJson(serviceContext.getInterfaceName()));
//getInterfaceName->null
LOGGER.warn("getLocalAddressString->{}", JsonUtil.toJson(serviceContext.getLocalAddressString()));
//getLocalAddressString->192.168.100.228:21000
LOGGER.warn("getLocalHost->{}", JsonUtil.toJson(serviceContext.getLocalHost()));
//getLocalHost->192.168.100.228
LOGGER.warn("getLocalHostName->{}", JsonUtil.toJson(serviceContext.getLocalHostName()));
//getLocalHostName->192.168.100.228
LOGGER.warn("getLocalPort->{}", JsonUtil.toJson(serviceContext.getLocalPort()));
//getLocalPort->21000
LOGGER.warn("getMethodName->{}", JsonUtil.toJson(serviceContext.getMethodName()));
//getMethodName->test
LOGGER.warn("getObjectAttachments->{}", JsonUtil.toJson(serviceContext.getObjectAttachments()));
//getObjectAttachments->{"traceId":"aaef470a3a164379b4f12517f743f5d6","input":"392","remote.application":"web"}
LOGGER.warn("getRemoteAddressString->{}", JsonUtil.toJson(serviceContext.getRemoteAddressString()));
//getRemoteAddressString->192.168.100.228:36992
LOGGER.warn("getRemoteApplicationName->{}", JsonUtil.toJson(serviceContext.getRemoteApplicationName()));
//getRemoteApplicationName->web
LOGGER.warn("getRemoteHost->{}", JsonUtil.toJson(serviceContext.getRemoteHost()));
//getRemoteHost->192.168.100.228
LOGGER.warn("getRemoteHostName->{}", JsonUtil.toJson(serviceContext.getRemoteHostName()));
//getRemoteHostName->saas-network-01
LOGGER.warn("getRemotePort->{}", JsonUtil.toJson(serviceContext.getRemotePort()));
//getRemotePort->36992
URL url = serviceContext.getUrl();
if(url != null) {LOGGER.warn("getAbsolutePath->{}", JsonUtil.toJson(url.getAbsolutePath()));//getAbsolutePath->/com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getAddress->{}", JsonUtil.toJson(url.getAddress()));//getAddress->192.168.100.228:21000LOGGER.warn("getAllParameters->{}", JsonUtil.toJson(url.getAllParameters()));//getAllParameters->{"release":"3.1.0","dubbo":"2.0.2","interface":"com.myb.wh.buss.service.base.FileService","application":"buss-service","anyhost":"true","pid":"3178994","side":"provider","metadata-type":"remote","methods":"copyFile,deleteFile,getUploadParam,deleteFolder,test,upload,html2Jpg,getFilesByDirectory,ofd2Pdf,jpg2Pdf,batchDeleteFile,html2Pdf,watermarkDIY","logger":"slf4j","deprecated":"false","service-name-mapping":"true","qos.enable":"false","timeout":"10000","bind.port":"21000","register-mode":"instance","generic":"false","bind.ip":"192.168.100.228","payload":"8388608","background":"false","dynamic":"true","service.filter":"dubboExceptionFilter,-exception","dispatcher":"message","qos.accept.foreign.ip":"false","timestamp":"1700834530470"}LOGGER.warn("getParameters->{}", JsonUtil.toJson(url.getParameters()));//getParameters->{"release":"3.1.0","dubbo":"2.0.2","interface":"com.myb.wh.buss.service.base.FileService","application":"buss-service","anyhost":"true","pid":"3178994","side":"provider","metadata-type":"remote","methods":"copyFile,deleteFile,getUploadParam,deleteFolder,test,upload,html2Jpg,getFilesByDirectory,ofd2Pdf,jpg2Pdf,batchDeleteFile,html2Pdf,watermarkDIY","logger":"slf4j","deprecated":"false","service-name-mapping":"true","qos.enable":"false","timeout":"10000","bind.port":"21000","register-mode":"instance","generic":"false","bind.ip":"192.168.100.228","payload":"8388608","background":"false","dynamic":"true","service.filter":"dubboExceptionFilter,-exception","dispatcher":"message","qos.accept.foreign.ip":"false","timestamp":"1700834530470"}LOGGER.warn("getPath->{}", JsonUtil.toJson(url.getPath()));//getPath->com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getServiceInterface->{}", JsonUtil.toJson(url.getServiceInterface()));//getServiceInterface->com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getServiceKey->{}", JsonUtil.toJson(url.getServiceKey()));//getServiceKey->com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getSide->{}", JsonUtil.toJson(url.getSide()));//getSide->providerLOGGER.warn("getIp->{}", JsonUtil.toJson(url.getIp()));//getIp->192.168.100.228LOGGER.warn("getApplication->{}", JsonUtil.toJson(url.getApplication()));//getApplication->buss-serviceLOGGER.warn("getBackupAddress->{}", JsonUtil.toJson(url.getBackupAddress()));//getBackupAddress->192.168.100.228:21000LOGGER.warn("getHost->{}", JsonUtil.toJson(url.getHost()));//getHost->192.168.100.228LOGGER.warn("getPort->{}", JsonUtil.toJson(url.getPort()));//getPort->21000LOGGER.warn("getRemoteApplication->{}", JsonUtil.toJson(url.getRemoteApplication()));//getRemoteApplication->nullLOGGER.warn("getServiceName->{}", JsonUtil.toJson(url.getServiceName()));//getServiceName->com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getSide->{}", JsonUtil.toJson(url.getSide()));//getSide->providerServiceModel serviceModel = url.getServiceModel();if(serviceModel != null) {LOGGER.warn("getServiceKey->{}", JsonUtil.toJson(serviceModel.getServiceKey()));//getServiceKey->com.myb.wh.buss.service.base.FileServiceLOGGER.warn("getServiceName->{}", JsonUtil.toJson(serviceModel.getServiceName()));//getServiceName->com.myb.wh.buss.service.base.FileService}
}URL consumerUrl = serviceContext.getConsumerUrl();
if(consumerUrl != null) { //為nullLOGGER.warn("getAbsolutePath->{}", JsonUtil.toJson(consumerUrl.getAbsolutePath()));LOGGER.warn("getAddress->{}", JsonUtil.toJson(consumerUrl.getAddress()));LOGGER.warn("getAllParameters->{}", JsonUtil.toJson(consumerUrl.getAllParameters()));LOGGER.warn("getApplication->{}", JsonUtil.toJson(consumerUrl.getApplication()));LOGGER.warn("getAttributes->{}", JsonUtil.toJson(consumerUrl.getAttributes()));LOGGER.warn("getBackupAddress->{}", JsonUtil.toJson(consumerUrl.getBackupAddress()));LOGGER.warn("getAuthority->{}", JsonUtil.toJson(consumerUrl.getAuthority()));LOGGER.warn("getCategory->{}", JsonUtil.toJson(consumerUrl.getCategory()));LOGGER.warn("getIp->{}", JsonUtil.toJson(consumerUrl.getIp()));LOGGER.warn("getPath->{}", JsonUtil.toJson(consumerUrl.getPath()));LOGGER.warn("getParametersv", JsonUtil.toJson(consumerUrl.getParameters()));LOGGER.warn("getPort->{}", JsonUtil.toJson(consumerUrl.getPort()));LOGGER.warn("getHost->{}", JsonUtil.toJson(consumerUrl.getHost()));LOGGER.warn("getRemoteApplication->{}", JsonUtil.toJson(consumerUrl.getRemoteApplication()));LOGGER.warn("getServiceInterface->{}", JsonUtil.toJson(consumerUrl.getServiceInterface()));LOGGER.warn("getServiceName->{}", JsonUtil.toJson(consumerUrl.getServiceName()));LOGGER.warn("getSide->{}", JsonUtil.toJson(consumerUrl.getSide()));LOGGER.warn("getServiceKey->{}", JsonUtil.toJson(consumerUrl.getServiceKey()));ServiceModel serviceModel = consumerUrl.getServiceModel();if(serviceModel != null) {LOGGER.warn("getServiceKey->{}", JsonUtil.toJson(serviceModel.getServiceKey()));LOGGER.warn("getServiceName->{}", JsonUtil.toJson(serviceModel.getServiceName()));}}
}

上述為執行內容, 后面在碰到其它場景, 再補充吧, 一般夠用了

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/167618.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/167618.shtml
英文地址,請注明出處:http://en.pswp.cn/news/167618.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

ElementUI table+dialog實現一個簡單的可編輯的表格

table組件如何實現可編輯呢? 我的需求是把table組件那樣的表格,實現它點擊可以彈出一個框,然后在這個框里面輸入你的東西,然后將他回顯回去,當然,輸入的有可能是時間啥的。 為什么要彈出彈層不在框上直接…

最近iphone手機的交管12123閃退,打不開的解決辦法?

蘋果手機系統和新版軟件不配,終極決絕辦法:升級IOS系統就好 可能是手機的內存不足了,因為在使用APP時,需要占用手機的內存,如果手機內存不足以支持軟件允許,軟件就會閃退。車主可以清理一下手機的內存&…

彈窗msvcp140_1.dll丟失的解決方法,超簡單的方法分享

在計算機使用過程中,我們經常會遇到一些錯誤提示,其中最常見的就是缺少某個文件的錯誤。最近,我在使用某些軟件時,遇到了一個名為“msvcp140_1.dll”的錯誤提示。這個錯誤通常出現在運行某些程序時,由于缺少了msvcp140…

項目總結報告(案例模板)

軟件項目總結報告模板套用: 項目概要項目工作分析經驗與教訓改進建議可納入的項目過程資產 --------進主頁獲取更多資料-------

2023年【汽車駕駛員(中級)】最新解析及汽車駕駛員(中級)試題及解析

題庫來源:安全生產模擬考試一點通公眾號小程序 2023年汽車駕駛員(中級)最新解析為正在備考汽車駕駛員(中級)操作證的學員準備的理論考試專題,每個月更新的汽車駕駛員(中級)試題及解…

Doris中的物化視圖-查詢(十九)

物化視圖創建完成后,用戶的查詢會根據規則自動匹配到最優的物化視圖。 比如我們有一張銷售記錄明細表,并且在這個明細表上創建了三張物化視圖。一個存儲了不同時間不同銷售員的售賣量,一個存儲了不同時間不同門店的銷售量,以及每…

C#,《小白學程序》第二課:數組,循環與排序

1 什么是數組&#xff1f; 數組 Array 是一組數值&#xff08;數 或 值&#xff09;。 int[] a; int[,] b; int[][] c; Anything[] d; 都是數組。 2 排序 排序就是按大小、名字、拼音或你指定的信息進行比較后排隊。 排序是數組最基本的功能需求。 3 文本格式 /// <summa…

《數據結構、算法與應用C++語言描述》-代碼實現散列表(線性探查與鏈式散列)

散列表 完整可編譯運行代碼&#xff1a;Github:Data-Structures-Algorithms-and-Applications/_22hash/ 定義 字典的另一種表示方法是散列&#xff08;hashing&#xff09;。它用一個散列函數&#xff08;也稱哈希函數&#xff09;把字典的數對映射到一個散列表&#xff08…

spring-webflux的一些概念的理解

Spring5的webflux可以支持高吞吐量&#xff0c;使用相同的資源可以處理更加多的請求&#xff0c;它將會成為未來技術的趨勢&#xff0c;但是相對于學習其他的框架相比&#xff0c;它的學習曲線很高&#xff0c;綜合了很多現有的技術&#xff0c;即使按照教程學習能編寫代碼&…

requests庫的學習(詳細篇)

一、request庫的安裝 requests屬于第三方庫&#xff0c;Python不內置&#xff0c;因此需要我們手動安裝。 pip3 install requests

HTML5新特性

HTML5新特性 前言語義化標簽常用語義化標簽優點 新增input屬性新增type屬性值內容其他新增input屬性 video&#xff08;視頻&#xff09;與audio&#xff08;音頻&#xff09;標簽 前言 本文主要講解HTML5中新增了哪些內容。 語義化標簽 HTML5新增了語義化標簽這個特性&…

第一類曲線積分@對弧長的曲線積分

文章目錄 abstract對弧長的曲線積分曲線形構件的質量第一類曲線積分曲線積分存在性利用曲線積分的定義描述曲線形構件質量問題推廣曲線積分可加性閉曲線積分 曲線積分性質曲線積分的計算方法證明(部分推導) 小結曲線弧顯函數形式方程下的曲線積分公式推廣例例例 abstract 在積…

html table樣式的設計 表格邊框修飾

<!DOCTYPE html> <html> <head> <meta http-equiv"Content-Type" content"text/html; charsetutf-8" /> <title>今日小說排行榜</title> <style> table {border-collapse: collapse;border: 4px double red; /*…

Python之Pygame游戲編程詳解

一、介紹 1.1 定義 Pygame是一種流行的Python游戲開發庫&#xff0c;它提供了許多功能&#xff0c;使開發人員可以輕松創建2D游戲。它具有良好的跨平臺支持&#xff0c;可以在多個操作系統上運行&#xff0c;例如Windows&#xff0c;MacOS和Linux。在本文中&#xff0c;我們將…

單鏈表的反轉?太細了哥們!細到離譜!

單鏈表的反轉&#xff08;面試常出&#xff09;&#xff1a; ? 單鏈表的反轉&#xff0c;可以通過很多種方法實現。包括迭代法&#xff0c;遞歸法&#xff0c; 迭代法&#xff1a; 定義三個指針&#xff1a;prev、current和next&#xff0c;它們分別表示前一個節點、當前節點…

NSGA-III求解微電網多目標優化調度(MATLAB)

一、NSGA-III簡介 NSGA-III算法由Kalyanmoy Deb和Himanshu Jain于 2014年提出。 參考文獻&#xff1a;Deb K , Jain H . An Evolutionary Many-Objective Optimization Algorithm Using Reference Point-Based Nondominated Sorting Approach, Part I: Solving Problems With …

[chroot+seccomp逃逸] THUCTF2019 之 固若金湯

題目分析 附件為一個源碼, 其中注釋我都寫好了, 主要就講關鍵的知識點. #define _GNU_SOURCE#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <string.h> #include <errno.h> #include <sched.h> #include <uni…

【C/PTA —— 10.函數1(課外實踐)】

C/PTA —— 10.函數1&#xff08;課外實踐&#xff09; 一.函數題6-1 符號函數6-2 求排列數6-3 求一個大于10的n位整數w的后n-1位的數&#xff0c;并作為函數值返回。6-4 其右上三角&#xff08;含主對角線&#xff09;元素之和。6-5 字符串比較6-6 使用函數求素數和6-7 使用函…

【電子通識】為什么說做產品不是簡單的將不同的技術進行搭積木?

很多人說做產品的硬件工程師&#xff0c;其實就是將專項技術工程師已經調好的模塊進行拼接。類似于小孩將積木搭成一個房子的形狀&#xff0c;雖然不同人搭的房子風格迥異&#xff0c;但所使用的原材料卻都是一樣的。 首先我并不同意這種看法&#xff0c;原因是產品工程師是需要…

JVM深入理解

JVM深入理解&#xff08;一&#xff09; JVM是什么 JRE、JDK和JVM 的關系 JVM原理 1、JVM是什么&#xff1f; JVM是Java Virtual Machine&#xff08;Java虛擬機&#xff09;的縮寫&#xff0c;由一套字節碼指令集、一組寄存器、一個棧、一個垃圾回收堆和一個存儲方法域等組…