Class RoutePredicateHandlerMapping
- java.lang.Object
-
- org.springframework.context.support.ApplicationObjectSupport
-
- org.springframework.web.reactive.handler.AbstractHandlerMapping
-
- org.springframework.cloud.gateway.handler.RoutePredicateHandlerMapping
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.context.ApplicationContextAware
,org.springframework.core.Ordered
,org.springframework.web.reactive.HandlerMapping
public class RoutePredicateHandlerMapping extends org.springframework.web.reactive.handler.AbstractHandlerMapping
- Author:
- Spencer Gibb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RoutePredicateHandlerMapping.ManagementPortType
-
Field Summary
-
Fields inherited from class org.springframework.web.reactive.handler.AbstractHandlerMapping
mappingsLogger
-
-
Constructor Summary
Constructors Constructor Description RoutePredicateHandlerMapping(FilteringWebHandler webHandler, RouteLocator routeLocator, GlobalCorsProperties globalCorsProperties, org.springframework.core.env.Environment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.cors.CorsConfiguration
getCorsConfiguration(Object handler, org.springframework.web.server.ServerWebExchange exchange)
protected reactor.core.publisher.Mono<?>
getHandlerInternal(org.springframework.web.server.ServerWebExchange exchange)
protected String
getSimpleName()
protected reactor.core.publisher.Mono<Route>
lookupRoute(org.springframework.web.server.ServerWebExchange exchange)
protected void
validateRoute(Route route, org.springframework.web.server.ServerWebExchange exchange)
Validate the given handler against the current request.-
Methods inherited from class org.springframework.web.reactive.handler.AbstractHandlerMapping
formatMappingName, getCorsProcessor, getHandler, getOrder, getPathPatternParser, hasCorsConfigurationSource, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setOrder, setUseCaseSensitiveMatch, setUseTrailingSlashMatch
-
-
-
-
Constructor Detail
-
RoutePredicateHandlerMapping
public RoutePredicateHandlerMapping(FilteringWebHandler webHandler, RouteLocator routeLocator, GlobalCorsProperties globalCorsProperties, org.springframework.core.env.Environment environment)
-
-
Method Detail
-
getHandlerInternal
protected reactor.core.publisher.Mono<?> getHandlerInternal(org.springframework.web.server.ServerWebExchange exchange)
- Specified by:
getHandlerInternal
in classorg.springframework.web.reactive.handler.AbstractHandlerMapping
-
getCorsConfiguration
protected org.springframework.web.cors.CorsConfiguration getCorsConfiguration(Object handler, org.springframework.web.server.ServerWebExchange exchange)
- Overrides:
getCorsConfiguration
in classorg.springframework.web.reactive.handler.AbstractHandlerMapping
-
lookupRoute
protected reactor.core.publisher.Mono<Route> lookupRoute(org.springframework.web.server.ServerWebExchange exchange)
-
validateRoute
protected void validateRoute(Route route, org.springframework.web.server.ServerWebExchange exchange)
Validate the given handler against the current request.The default implementation is empty. Can be overridden in subclasses, for example to enforce specific preconditions expressed in URL mappings.
- Parameters:
route
- the Route object to validateexchange
- current exchange- Throws:
Exception
- if validation failed
-
getSimpleName
protected String getSimpleName()
-
-