mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-02 02:34:26 +00:00
update 升级 jdk 17
update springboot 3.0.7 update springcloud 2022.0.2 update springcloud-alibaba 2022.0.0.0-RC2 update springboot-admin 3.0.4 update springdoc 2.1.0 update dynamic-ds 3.6.1 add flatten-maven-plugin update javax -> jakarta ...........未完待续
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
<!-- Sa-Token 权限认证(Reactor响应式集成), 在线文档:http://sa-token.dev33.cn/ -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-reactor-spring-boot-starter</artifactId>
|
||||
<artifactId>sa-token-reactor-spring-boot3-starter</artifactId>
|
||||
<version>${satoken.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
@@ -19,6 +19,7 @@ import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -64,9 +65,11 @@ public class WebFluxUtils {
|
||||
Flux<DataBuffer> body = serverHttpRequest.getBody();
|
||||
AtomicReference<String> bodyRef = new AtomicReference<>();
|
||||
body.subscribe(buffer -> {
|
||||
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(buffer.asByteBuffer());
|
||||
DataBufferUtils.release(buffer);
|
||||
bodyRef.set(charBuffer.toString());
|
||||
try (DataBuffer.ByteBufferIterator iterator = buffer.readableByteBuffers()) {
|
||||
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(iterator.next());
|
||||
DataBufferUtils.release(buffer);
|
||||
bodyRef.set(charBuffer.toString());
|
||||
}
|
||||
});
|
||||
return bodyRef.get();
|
||||
}
|
||||
@@ -85,8 +88,10 @@ public class WebFluxUtils {
|
||||
return null;
|
||||
}
|
||||
DataBuffer buffer = (DataBuffer) obj;
|
||||
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(buffer.asByteBuffer());
|
||||
return charBuffer.toString();
|
||||
try (DataBuffer.ByteBufferIterator iterator = buffer.readableByteBuffers()) {
|
||||
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(iterator.next());
|
||||
return charBuffer.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user