接口 HandlerMapping
- 所有已知实现类:
AbstractHandlerMapping
,AbstractHandlerMethodMapping
,AbstractUrlHandlerMapping
,RequestMappingHandlerMapping
,RequestMappingInfoHandlerMapping
,RouterFunctionMapping
,SimpleUrlHandlerMapping
public interface HandlerMapping
Interface to be implemented by objects that define a mapping between requests and handler objects.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev, Sebastien Deleuze
字段概要
字段 修饰符和类型 字段 说明 static String
BEST_MATCHING_HANDLER_ATTRIBUTE
Name of theattribute
that contains the mapped handler for the best matching pattern.static String
BEST_MATCHING_PATTERN_ATTRIBUTE
Name of theattribute
that contains the best matching pattern within the handler mapping.static String
MATRIX_VARIABLES_ATTRIBUTE
Name of theattribute
that contains a map with URI variable names and a corresponding MultiValueMap of URI matrix variables for each.static String
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
Name of theattribute
that contains the path within the handler mapping, in case of a pattern match such as"/static/**"
or the full relevant URI otherwise.static String
PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
Name of theattribute
containing the set of producible MediaType's applicable to the mapped handler.static String
URI_TEMPLATE_VARIABLES_ATTRIBUTE
Name of theattribute
that contains the URI templates map mapping variable names to values.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 reactor.core.publisher.Mono<Object>
getHandler(ServerWebExchange exchange)
Return a handler for this request.
字段详细资料
BEST_MATCHING_HANDLER_ATTRIBUTE
static final String BEST_MATCHING_HANDLER_ATTRIBUTE
Name of theattribute
that contains the mapped handler for the best matching pattern.
BEST_MATCHING_PATTERN_ATTRIBUTE
static final String BEST_MATCHING_PATTERN_ATTRIBUTE
Name of theattribute
that contains the best matching pattern within the handler mapping.
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
static final String PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
Name of theattribute
that contains the path within the handler mapping, in case of a pattern match such as"/static/**"
or the full relevant URI otherwise.Note: This attribute is not required to be supported by all HandlerMapping implementations. URL-based HandlerMappings will typically support it but handlers should not necessarily expect this request attribute to be present in all scenarios.
URI_TEMPLATE_VARIABLES_ATTRIBUTE
static final String URI_TEMPLATE_VARIABLES_ATTRIBUTE
Name of theattribute
that contains the URI templates map mapping variable names to values.Note: This attribute is not required to be supported by all HandlerMapping implementations. URL-based HandlerMappings will typically support it, but handlers should not necessarily expect this request attribute to be present in all scenarios.
MATRIX_VARIABLES_ATTRIBUTE
static final String MATRIX_VARIABLES_ATTRIBUTE
Name of theattribute
that contains a map with URI variable names and a corresponding MultiValueMap of URI matrix variables for each.Note: This attribute is not required to be supported by all HandlerMapping implementations and may also not be present depending on whether the HandlerMapping is configured to keep matrix variable content in the request URI.
PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
static final String PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE
Name of theattribute
containing the set of producible MediaType's applicable to the mapped handler.Note: This attribute is not required to be supported by all HandlerMapping implementations. Handlers should not necessarily expect this request attribute to be present in all scenarios.
方法详细资料
getHandler
reactor.core.publisher.Mono<Object> getHandler(ServerWebExchange exchange)
Return a handler for this request.- 参数:
exchange
- current server exchange- 返回:
- a
Mono
that emits one value or none in case the request cannot be resolved to a handler