Example usage for org.springframework.web.reactive.function.server ServerRequest path

List of usage examples for org.springframework.web.reactive.function.server ServerRequest path

Introduction

In this page you can find the example usage for org.springframework.web.reactive.function.server ServerRequest path.

Prototype

default String path() 

Source Link

Document

Get the request path.

Usage

From source file:org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.java

private String formatError(Throwable ex, ServerRequest request) {
    String reason = ex.getClass().getSimpleName() + ": " + ex.getMessage();
    return "Resolved [" + reason + "] for HTTP " + request.methodName() + " " + request.path();
}

From source file:org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.java

private String formatRequest(ServerRequest request) {
    String rawQuery = request.uri().getRawQuery();
    String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
    return "HTTP " + request.methodName() + " \"" + request.path() + query + "\"";
}

From source file:org.springframework.cloud.function.web.function.FunctionEndpointInitializer.java

@SuppressWarnings("unchecked")
private Function<Flux<?>, Flux<?>> extract(ServerRequest request) {
    Function<Flux<?>, Flux<?>> function;
    if (handler != null) {
        logger.info("Configured function: " + handler);
        Set<String> names = this.functionCatalog.getNames(Function.class);
        Assert.isTrue(names.contains(handler), "Cannot locate function: " + handler);
        function = this.functionCatalog.lookup(Function.class, handler);
    } else {/*from ww w  .  java 2  s  .  co m*/
        function = (Function<Flux<?>, Flux<?>>) FunctionWebUtils.findFunction(request.method(), functionCatalog,
                request.attributes(), request.path());
    }
    return function;
}