Add RouterFunctions#toWebHandler(RouterFunction<?>)
This commit is contained in:
@@ -203,6 +203,16 @@ public abstract class RouterFunctions {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given {@linkplain RouterFunction router function} into a {@link WebHandler}.
|
||||||
|
* This conversion uses {@linkplain HandlerStrategies#builder() default strategies}.
|
||||||
|
* @param routerFunction the router function to convert
|
||||||
|
* @return a web handler that handles web request using the given router function
|
||||||
|
*/
|
||||||
|
public static WebHandler toWebHandler(RouterFunction<?> routerFunction) {
|
||||||
|
return toWebHandler(routerFunction, HandlerStrategies.withDefaults());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the given {@linkplain RouterFunction router function} into a {@link WebHandler},
|
* Convert the given {@linkplain RouterFunction router function} into a {@link WebHandler},
|
||||||
* using the given strategies.
|
* using the given strategies.
|
||||||
|
|||||||
Reference in New Issue
Block a user