接口的使用
org.springframework.web.servlet.function.HandlerFilterFunction
使用HandlerFilterFunction的程序包 程序包 说明 org.springframework.web.servlet.function Provides the types that make up Spring's functional web framework for Servlet environments.org.springframework.web.servlet.function中HandlerFilterFunction的使用
返回HandlerFilterFunction的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 default HandlerFilterFunction<T,R>
HandlerFilterFunction. andThen(HandlerFilterFunction<T,T> after)
Return a composed filter function that first applies this filter, and then applies theafter
filter.static <T extends ServerResponse>
HandlerFilterFunction<T,T>HandlerFilterFunction. ofErrorHandler(Predicate<Throwable> predicate, BiFunction<Throwable,ServerRequest,T> errorHandler)
Adapt the given predicate and response provider function to a filter function that returns aServerResponse
on a given exception.static <T extends ServerResponse>
HandlerFilterFunction<T,T>HandlerFilterFunction. ofRequestProcessor(Function<ServerRequest,ServerRequest> requestProcessor)
Adapt the given request processor function to a filter function that only operates on theServerRequest
.static <T extends ServerResponse,R extends ServerResponse>
HandlerFilterFunction<T,R>HandlerFilterFunction. ofResponseProcessor(BiFunction<ServerRequest,T,R> responseProcessor)
Adapt the given response processor function to a filter function that only operates on theServerResponse
.参数类型为HandlerFilterFunction的org.springframework.web.servlet.function中的方法 修饰符和类型 方法 说明 default HandlerFilterFunction<T,R>
HandlerFilterFunction. andThen(HandlerFilterFunction<T,T> after)
Return a composed filter function that first applies this filter, and then applies theafter
filter.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.RouterFunctions.Builder
RouterFunctions.Builder. filter(HandlerFilterFunction<ServerResponse,ServerResponse> filterFunction)
Filters all routes created by this builder with the given filter function.