From 9a2e7728a99da4c60c924ebd79e2d0a1af01eb02 Mon Sep 17 00:00:00 2001 From: deipss Date: Tue, 8 Nov 2022 00:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81dubbo=203.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repeater/plugin/dubbo/DubboConsumerPlugin.java | 10 +++++++++- .../repeater/plugin/dubbo/DubboProviderPlugin.java | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboConsumerPlugin.java b/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboConsumerPlugin.java index cdba10a9..f9a01a7e 100644 --- a/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboConsumerPlugin.java +++ b/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboConsumerPlugin.java @@ -35,7 +35,15 @@ protected List getEnhanceModels() { .methodPatterns(EnhanceModel.MethodPattern.transform("invoke")) .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) .build(); - return Lists.newArrayList(onResponse, invoke); + EnhanceModel onResponseV3 = EnhanceModel.builder().classPattern("org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter") + .methodPatterns(EnhanceModel.MethodPattern.transform("onResponse")) + .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) + .build(); + EnhanceModel invokeV3 = EnhanceModel.builder().classPattern("org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter") + .methodPatterns(EnhanceModel.MethodPattern.transform("invoke")) + .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) + .build(); + return Lists.newArrayList(onResponse, invoke,onResponseV3,invokeV3); } @Override diff --git a/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboProviderPlugin.java b/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboProviderPlugin.java index fb029fc7..a18ba7af 100644 --- a/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboProviderPlugin.java +++ b/repeater-plugins/dubbo-plugin/src/main/java/com/alibaba/jvm/sandbox/repeater/plugin/dubbo/DubboProviderPlugin.java @@ -30,11 +30,15 @@ protected List getEnhanceModels() { .methodPatterns(EnhanceModel.MethodPattern.transform("onResponse")) .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) .build(); + EnhanceModel onResponseV3 = EnhanceModel.builder().classPattern("org.apache.dubbo.rpc.filter.ContextFilter") + .methodPatterns(EnhanceModel.MethodPattern.transform("onResponse")) + .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) + .build(); EnhanceModel invoke = EnhanceModel.builder().classPattern("org.apache.dubbo.rpc.filter.ContextFilter") .methodPatterns(EnhanceModel.MethodPattern.transform("invoke")) .watchTypes(Event.Type.BEFORE, Event.Type.RETURN, Event.Type.THROWS) .build(); - return Lists.newArrayList(invoke, onResponse); + return Lists.newArrayList(invoke, onResponse,onResponseV3); } @Override