From aca75d520dcec458194d3bd9b4d7da0fbfffb194 Mon Sep 17 00:00:00 2001 From: hexiaofeng Date: Sat, 18 Jan 2025 09:34:46 +0800 Subject: [PATCH] Remove useless transmission --- .../WebHandlerDecoratorInterceptor.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/joylive-plugin/joylive-transmission/joylive-transmission-springweb5/src/main/java/com/jd/live/agent/plugin/transmission/springweb/v5/interceptor/WebHandlerDecoratorInterceptor.java b/joylive-plugin/joylive-transmission/joylive-transmission-springweb5/src/main/java/com/jd/live/agent/plugin/transmission/springweb/v5/interceptor/WebHandlerDecoratorInterceptor.java index 85083d77..c3a9289c 100644 --- a/joylive-plugin/joylive-transmission/joylive-transmission-springweb5/src/main/java/com/jd/live/agent/plugin/transmission/springweb/v5/interceptor/WebHandlerDecoratorInterceptor.java +++ b/joylive-plugin/joylive-transmission/joylive-transmission-springweb5/src/main/java/com/jd/live/agent/plugin/transmission/springweb/v5/interceptor/WebHandlerDecoratorInterceptor.java @@ -16,15 +16,11 @@ package com.jd.live.agent.plugin.transmission.springweb.v5.interceptor; import com.jd.live.agent.bootstrap.bytekit.context.ExecutableContext; -import com.jd.live.agent.bootstrap.bytekit.context.MethodContext; import com.jd.live.agent.core.plugin.definition.InterceptorAdaptor; import com.jd.live.agent.governance.context.RequestContext; import com.jd.live.agent.governance.context.bag.Propagation; import com.jd.live.agent.governance.request.HeaderReader.MultiValueMapReader; -import com.jd.live.agent.governance.request.HeaderWriter.MultiValueMapWriter; -import org.springframework.http.HttpHeaders; import org.springframework.web.server.ServerWebExchange; -import reactor.core.publisher.Mono; /** * WebHandlerDecoratorInterceptor @@ -46,15 +42,4 @@ public void onEnter(ExecutableContext ctx) { ServerWebExchange exchange = ctx.getArgument(0); propagation.read(RequestContext.create(), new MultiValueMapReader(exchange.getRequest().getHeaders())); } - - @Override - public void onSuccess(ExecutableContext ctx) { - // for outbound traffic - MethodContext mc = (MethodContext) ctx; - ServerWebExchange exchange = ctx.getArgument(0); - HttpHeaders headers = HttpHeaders.writableHttpHeaders(exchange.getResponse().getHeaders()); - Mono mono = mc.getResult(); - mono = mono.doFirst(() -> propagation.write(RequestContext.get(), new MultiValueMapWriter(headers))); - mc.setResult(mono); - } }