这个解决方案依赖于不推荐的方法HttpClient.create().tcpConfiguration
和BootstrapHandlers
类。
基本上我想创造
public class HttpLoggingHandler extends LoggingHandler
并配置HttpClient
如何使用反应堆网络版1.0.13
及以上版本实现相同的目标?
发布于 2022-06-08 06:12:00
您可以使用反应堆Netty提供的生命周期回调(更多信息这里)
HttpClient.create()
.doOnChannelInit((observer, channel, remoteAddress) ->
channel.pipeline()
.addFirst(new LoggingHandler("reactor.netty.examples")));
https://stackoverflow.com/questions/72536675
复制相似问题