Skip to content

Commit

Permalink
[#11210] Update DispatcherHandler.handleResult() of spring webflux 6
Browse files Browse the repository at this point in the history
  • Loading branch information
jaehong-kim committed Jul 3, 2024
1 parent ae66fc2 commit 887ec53
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,21 @@ public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, Strin
if (invokerHandlerMethod != null) {
invokerHandlerMethod.addInterceptor(DispatchHandlerInvokeHandlerMethodInterceptor.class, va(this.uriStatEnable, Boolean.valueOf(false)));
}
// 6.x
final InstrumentMethod handleRequestWithMethod = target.getDeclaredMethod("handleRequestWith", "org.springframework.web.server.ServerWebExchange", "java.lang.Object");
if (handleRequestWithMethod != null) {
handleRequestWithMethod.addInterceptor(DispatchHandlerInvokeHandlerMethodInterceptor.class, va(this.uriStatEnable, Boolean.valueOf(false)));
}
// Result
final InstrumentMethod handleResultMethod = target.getDeclaredMethod("handleResult", "org.springframework.web.server.ServerWebExchange", "org.springframework.web.reactive.HandlerResult");
if (handleResultMethod != null) {
handleResultMethod.addInterceptor(DispatchHandlerInvokeHandlerMethodInterceptor.class, va(this.uriStatEnable, this.uriStatUseUserInput));
}
// 6.x
final InstrumentMethod handleResultMethod2 = target.getDeclaredMethod("handleResult", "org.springframework.web.server.ServerWebExchange", "org.springframework.web.reactive.HandlerResult", "java.lang.String");
if (handleResultMethod2 != null) {
handleResultMethod2.addInterceptor(DispatchHandlerInvokeHandlerMethodInterceptor.class, va(this.uriStatEnable, this.uriStatUseUserInput));
}

return target.toBytecode();
}
Expand Down

0 comments on commit 887ec53

Please sign in to comment.