public static Mono<Void> result(final ServerWebExchange exchange, final Object result) {
        if (Objects.isNull(result)) {
            return Mono.empty();
        }
        final ShenyuResult<?> shenyuResult = ShenyuResultWrap.shenyuResult();
        Object resultData = shenyuResult.format(exchange, result);
        // basic data use text/plain
        MediaType mediaType = MediaType.TEXT_PLAIN;
        if (!ObjectTypeUtils.isBasicType(result)) {
            mediaType = shenyuResult.contentType(exchange, resultData);
        }
        exchange.getResponse().getHeaders().setContentType(mediaType);
        final Object responseData = shenyuResult.result(exchange, resultData);
        Objects.requireNonNull(responseData);
        final byte[] bytes = (responseData instanceof byte[])
                ? (byte[]) responseData : responseData.toString().getBytes(StandardCharsets.UTF_8);
        return exchange.getResponse().writeWith(Mono.just(exchange.getResponse()
                .bufferFactory().wrap(bytes))
                .doOnNext(data -> exchange.getResponse().getHeaders().setContentLength(data.readableByteCount())));
    }
Response result.

@param exchange the exchange
@param result   the result
@return the result
shenyu-plugin/shenyu-plugin-api/src/main/java/org/apache/shenyu/plugin/api/utils/WebFluxResultUtils.java