public class BusiLogResponseCaptureFilter
extends java.lang.Object
implements org.springframework.web.server.WebFilter, org.springframework.core.Ordered
ResponseBodyCapture decorator on the response
BEFORE the ShenYu plugin chain executes.
This is necessary because BusiLogPlugin (order=1050) runs AFTER the response plugin (order=420). The response plugin writes the body AFTER busiLog's chain.execute() completes, so busiLog cannot capture the response via its own decorator.
By installing the capture at the WebFilter level (which runs before the entire ShenYu plugin chain), the response plugin writes through the capture decorator. BusiLogPlugin then registers a callback in exchange attributes, which the capture triggers from writeWith() when the body is actually written.
Performance: when no callback is registered (request doesn't match busiLog rules), writeWith() passes through without any buffering overhead.
| 构造器和说明 |
|---|
BusiLogResponseCaptureFilter() |
public reactor.core.publisher.Mono<java.lang.Void> filter(org.springframework.web.server.ServerWebExchange exchange,
org.springframework.web.server.WebFilterChain chain)
filter 在接口中 org.springframework.web.server.WebFilterpublic int getOrder()
getOrder 在接口中 org.springframework.core.OrderedCopyright © 2026 The Apache Software Foundation. All rights reserved.