Class AbstractHandlerMapping
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.reactive.handler.AbstractHandlerMapping
- All Implemented Interfaces:
Aware, BeanNameAware, ApplicationContextAware, Ordered, HandlerMapping
- Direct Known Subclasses:
AbstractHandlerMethodMapping, AbstractUrlHandlerMapping, RouterFunctionMapping
public abstract class AbstractHandlerMapping
extends ApplicationObjectSupport
implements HandlerMapping, Ordered, BeanNameAware
Abstract base class for
HandlerMapping
implementations.- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Juergen Hoeller, Brian Clozel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.LogDedicated "hidden" logger for request mappings.Fields inherited from class ApplicationObjectSupport
loggerFields inherited from interface HandlerMapping
API_VERSION_ATTRIBUTE, BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTEFields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturn the configuredApiVersionStrategystrategy.protected @Nullable CorsConfigurationgetCorsConfiguration(Object handler, ServerWebExchange exchange) Retrieve the CORS configuration for the given handler.Return the configuredCorsProcessor.reactor.core.publisher.Mono<Object> getHandler(ServerWebExchange exchange) Return a handler for this request.protected abstract reactor.core.publisher.Mono<?> getHandlerInternal(ServerWebExchange exchange) Look up a handler for the given request, returning an emptyMonoif no specific one is found.intgetOrder()Get the order value of this object.Return thePathPatternParserinstance that is used forCORS configuration checks.protected booleanhasCorsConfigurationSource(Object handler) Returntrueif there is aCorsConfigurationSourcefor this handler.voidsetApiVersionStrategy(@Nullable ApiVersionStrategy strategy) Configure a strategy to manage API versioning.voidsetBeanName(String name) Set the name of the bean in the bean factory that created this bean.voidsetCorsConfigurations(Map<String, CorsConfiguration> corsConfigurations) Set the "global" CORS configurations based on URL patterns.voidsetCorsConfigurationSource(CorsConfigurationSource corsConfigurationSource) Set the "global" CORS configuration source.voidsetCorsProcessor(CorsProcessor corsProcessor) Configure a customCorsProcessorto use to apply the matchedCorsConfigurationfor a request.voidsetOrder(int order) Specify the order value for this HandlerMapping bean.voidsetUseCaseSensitiveMatch(boolean caseSensitiveMatch) Shortcut method for setting the same property on the underlying pattern parser in use.
-
Field Details
-
mappingsLogger
protected final org.apache.commons.logging.Log mappingsLoggerDedicated "hidden" logger for request mappings.
-
-
Constructor Details
-
AbstractHandlerMapping
public AbstractHandlerMapping()
-
-
Method Details
-
setUseCaseSensitiveMatch
public void setUseCaseSensitiveMatch(boolean caseSensitiveMatch) Shortcut method for setting the same property on the underlying pattern parser in use. For more details see:getPathPatternParser()-- the underlying pattern parserPathPatternParser.setCaseSensitive(boolean)-- the case sensitive slash option, including its default value.
Note: aside from
-
getPathPatternParser
public
-