mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-10-14 06:00:23 +00:00
update ruoyi-gateway/src/main/java/org/dromara/gateway/utils/WebFluxUtils.java.
遍历ByteBuffer,不然可能会遇到body不完整,现象是日志中打印的参数不全,被截断。 Signed-off-by: java9 <qzzsunly@163.com>
This commit is contained in:
@@ -88,8 +88,11 @@ public class WebFluxUtils {
|
||||
}
|
||||
DataBuffer buffer = (DataBuffer) obj;
|
||||
try (DataBuffer.ByteBufferIterator iterator = buffer.readableByteBuffers()) {
|
||||
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(iterator.next());
|
||||
return charBuffer.toString();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
iterator.forEachRemaining(e -> {
|
||||
sb.append(StandardCharsets.UTF_8.decode(e));
|
||||
});
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user