@Test public void and() throws Exception { HandlerFunction<ServerResponse> handlerFunction = request -> ServerResponse.ok().build(); RouterFunction<ServerResponse> routerFunction1 = request -> Mono.empty(); RouterFunction<ServerResponse> routerFunction2 = request -> Mono.just(handlerFunction); RouterFunction<ServerResponse> result = routerFunction1.and(routerFunction2); assertNotNull(result); MockServerRequest request = MockServerRequest.builder().build(); Mono<HandlerFunction<ServerResponse>> resultHandlerFunction = result.route(request); StepVerifier.create(resultHandlerFunction) .expectNext(handlerFunction) .expectComplete() .verify(); }
public static <T extends ServerResponse> RouterFunction<T> route( RequestPredicate predicate, HandlerFunction<T> handlerFunction) { return new DefaultRouterFunction<>(predicate, handlerFunction); }
RouterFunctions { public static <T extends ServerResponse> RouterFunction<T> route( RequestPredicate predicate, HandlerFunction<T> handlerFunction) { return new DefaultRouterFunction<>(predicate, handlerFunction); } }
RouterFunctions { public static <T extends ServerResponse> RouterFunction<T> route( RequestPredicate predicate, HandlerFunction<T> handlerFunction) { return new DefaultRouterFunction<>(predicate, handlerFunction); }  }
RouterFunctions { public static <T extends ServerResponse> RouterFunction<T> route( RequestPredicate predicate, HandlerFunction<T> handlerFunction) { return new DefaultRouterFunction<>(predicate, handlerFunction); }  static RouterFunction<T> route(
			RequestPredicate predicate, HandlerFunction<T> handlerFunction); static RouterFunction<T> nest(
			RequestPredicate predicate, RouterFunction<T> routerFunction); static RouterFunction<ServerResponse> resources(String pattern, Resource location); static Function<ServerRequest, Mono<Resource>> resourceLookupFunction(String pattern, Resource location); static RouterFunction<ServerResponse> resources(Function<ServerRequest, Mono<Resource>> lookupFunction); static HttpHandler toHttpHandler(RouterFunction<?> routerFunction); static HttpHandler toHttpHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies); static WebHandler toWebHandler(RouterFunction<?> routerFunction); static WebHandler toWebHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies); }
RouterFunctions { public static <T extends ServerResponse> RouterFunction<T> route( RequestPredicate predicate, HandlerFunction<T> handlerFunction) { return new DefaultRouterFunction<>(predicate, handlerFunction); }  static RouterFunction<T> route(
			RequestPredicate predicate, HandlerFunction<T> handlerFunction); static RouterFunction<T> nest(
			RequestPredicate predicate, RouterFunction<T> routerFunction); static RouterFunction<ServerResponse> resources(String pattern, Resource location); static Function<ServerRequest, Mono<Resource>> resourceLookupFunction(String pattern, Resource location); static RouterFunction<ServerResponse> resources(Function<ServerRequest, Mono<Resource>> lookupFunction); static HttpHandler toHttpHandler(RouterFunction<?> routerFunction); static HttpHandler toHttpHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies); static WebHandler toWebHandler(RouterFunction<?> routerFunction); static WebHandler toWebHandler(RouterFunction<?> routerFunction, HandlerStrategies strategies); static final String REQUEST_ATTRIBUTE; static final String URI_TEMPLATE_VARIABLES_ATTRIBUTE; }