接口的使用
org.springframework.web.reactive.function.server.RouterFunction
使用RouterFunction的程序包 程序包 说明 org.springframework.test.web.reactive.server Support for testing Spring WebFlux server endpoints viaWebTestClient.org.springframework.web.reactive.function.server Provides the types that make up Spring's functional web framework for Reactive environments.org.springframework.web.reactive.function.server.support Classes supporting theorg.springframework.web.reactive.function.serverpackage.org.springframework.test.web.reactive.server中RouterFunction的使用
参数类型为RouterFunction的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 static WebTestClient.RouterFunctionSpecWebTestClient. bindToRouterFunction(RouterFunction<?> routerFunction)Use this option to set up a server from aRouterFunction.org.springframework.web.reactive.function.server中RouterFunction的使用
返回RouterFunction的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 default RouterFunction<T>RouterFunction. and(RouterFunction<T> other)Return a composed routing function that first invokes this function, and then invokes theotherfunction (of the same response typeT) if this route had no result.default RouterFunction<T>RouterFunction. andNest(RequestPredicate predicate, RouterFunction<T> routerFunction)Return a composed routing function that routes to the given router function if this route does not match and the given request predicate applies.default RouterFunction<?>RouterFunction. andOther(RouterFunction<?> other)Return a composed routing function that first invokes this function, and then invokes theotherfunction (of a different response type) if this route had no result.default RouterFunction<T>RouterFunction. andRoute(RequestPredicate predicate, HandlerFunction<T> handlerFunction)Return a composed routing function that routes to the given handler function if this route does not match and the given request predicate applies.RouterFunction<ServerResponse>RouterFunctions.Builder. build()Builds theRouterFunction.default <S extends ServerResponse>
RouterFunction<S>RouterFunction. filter(HandlerFilterFunction<T,S> filterFunction)Filter all handler functions routed by this function with the given filter function.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions. nest(RequestPredicate predicate, RouterFunction<T> routerFunction)Route to the given router function if the given request predicate applies.static RouterFunction<ServerResponse>RouterFunctions. resources(String pattern, Resource location)Route requests that match the given pattern to resources relative to the given root location.static RouterFunction<ServerResponse>RouterFunctions. resources(Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)Route to resources using the provided lookup function.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions. route(RequestPredicate predicate, HandlerFunction<T> handlerFunction)Route to the given handler function if the given request predicate applies.参数类型为RouterFunction的org.springframework.web.reactive.function.server中的方法 修饰符和类型 方法 说明 RouterFunctions.BuilderRouterFunctions.Builder. add(RouterFunction<ServerResponse> routerFunction)Adds the given route to this builder.default RouterFunction<T>RouterFunction. and(RouterFunction<T> other)Return a composed routing function that first invokes this function, and then invokes theotherfunction (of the same response typeT) if this route had no result.default RouterFunction<T>RouterFunction. andNest(RequestPredicate predicate, RouterFunction<T> routerFunction)Return a composed routing function that routes to the given router function if this route does not match and the given request predicate applies.default RouterFunction<?>RouterFunction. andOther(RouterFunction<?> other)Return a composed routing function that first invokes this function, and then invokes theotherfunction (of a different response type) if this route had no result.static <T extends ServerResponse>
RouterFunction<T>RouterFunctions. nest(RequestPredicate predicate, RouterFunction<T> routerFunction)Route to the given router function if the given request predicate applies.static HttpHandlerRouterFunctions. toHttpHandler(RouterFunction<?> routerFunction)Convert the given router function into aHttpHandler.static HttpHandlerRouterFunctions. toHttpHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies)Convert the given router function into aHttpHandler, using the given strategies.static WebHandlerRouterFunctions. toWebHandler(RouterFunction<?> routerFunction)Convert the given router function into aWebHandler.static WebHandlerRouterFunctions. toWebHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies)Convert the given router function into aWebHandler, using the given strategies.voidRouterFunctions.Visitor. unknown(RouterFunction<?> routerFunction)Receive notification of an unknown router function.类型变量类型为RouterFunction的org.springframework.web.reactive.function.server中的方法参数 修饰符和类型 方法 说明 RouterFunctions.BuilderRouterFunctions.Builder. nest(RequestPredicate predicate, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier)Route to the supplied router function if the given request predicate applies.RouterFunctions.BuilderRouterFunctions.Builder. path(String pattern, Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier)Route to the supplied router function if the given path prefix pattern applies.org.springframework.web.reactive.function.server.support中RouterFunction的使用
返回RouterFunction的org.springframework.web.reactive.function.server.support中的方法 修饰符和类型 方法 说明 RouterFunction<?>RouterFunctionMapping. getRouterFunction()Return the configuredRouterFunction.参数类型为RouterFunction的org.springframework.web.reactive.function.server.support中的构造器 构造器 说明 RouterFunctionMapping(RouterFunction<?> routerFunction)Create aRouterFunctionMappingwith the givenRouterFunction.