public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappingInfoHandlerMapping implements InitializingBean, MatchableHandlerMapping
HandlerMapping
that makes web endpoints
available over HTTP using Spring MVC.Modifier and Type | Class and Description |
---|---|
protected static interface |
AbstractWebMvcEndpointHandlerMapping.LinksHandler
Handler providing actuator links at the root endpoint.
|
protected static interface |
AbstractWebMvcEndpointHandlerMapping.ServletWebOperation
A servlet web operation that can be handled by Spring MVC.
|
mappingsLogger
logger
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, LOOKUP_PATH, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping,
Collection<ExposableWebEndpoint> endpoints,
EndpointMediaTypes endpointMediaTypes,
boolean shouldRegisterLinksMapping)
Creates a new
WebEndpointHandlerMapping that provides mappings for the
operations of the given webEndpoints . |
AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping,
Collection<ExposableWebEndpoint> endpoints,
EndpointMediaTypes endpointMediaTypes,
CorsConfiguration corsConfiguration,
boolean shouldRegisterLinksMapping)
Creates a new
AbstractWebMvcEndpointHandlerMapping that provides mappings
for the operations of the given endpoints. |
AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping,
Collection<ExposableWebEndpoint> endpoints,
EndpointMediaTypes endpointMediaTypes,
CorsConfiguration corsConfiguration,
boolean shouldRegisterLinksMapping,
PathPatternParser pathPatternParser)
Creates a new
AbstractWebMvcEndpointHandlerMapping that provides mappings
for the operations of the given endpoints. |
getDirectPaths, getHandlerInternal, getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setPatternParser, unregisterMapping
adaptInterceptor, detectMappedInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, initApplicationContext, initInterceptors, initLookupPath, setAlwaysUseFullPath, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatterns
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPatternParser
getHandler, usesPathPatterns
public AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, boolean shouldRegisterLinksMapping)
WebEndpointHandlerMapping
that provides mappings for the
operations of the given webEndpoints
.endpointMapping
- the base mapping for all endpointsendpoints
- the web endpointsendpointMediaTypes
- media types consumed and produced by the endpointsshouldRegisterLinksMapping
- whether the links endpoint should be registeredpublic AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, CorsConfiguration corsConfiguration, boolean shouldRegisterLinksMapping)
AbstractWebMvcEndpointHandlerMapping
that provides mappings
for the operations of the given endpoints.endpointMapping
- the base mapping for all endpointsendpoints
- the web endpointsendpointMediaTypes
- media types consumed and produced by the endpointscorsConfiguration
- the CORS configuration for the endpoints or null
shouldRegisterLinksMapping
- whether the links endpoint should be registeredpublic AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, CorsConfiguration corsConfiguration, boolean shouldRegisterLinksMapping, PathPatternParser pathPatternParser)
AbstractWebMvcEndpointHandlerMapping
that provides mappings
for the operations of the given endpoints.endpointMapping
- the base mapping for all endpointsendpoints
- the web endpointsendpointMediaTypes
- media types consumed and produced by the endpointscorsConfiguration
- the CORS configuration for the endpoints or null
shouldRegisterLinksMapping
- whether the links endpoint should be registeredpathPatternParser
- the path pattern parserpublic void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected void initHandlerMethods()
initHandlerMethods
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected HandlerMethod createHandlerMethod(Object handler, Method method)
createHandlerMethod
in class AbstractHandlerMethodMapping<RequestMappingInfo>
public RequestMatchResult match(HttpServletRequest request, String pattern)
match
in interface MatchableHandlerMapping
protected void registerMapping(ExposableWebEndpoint endpoint, WebOperationRequestPredicate predicate, WebOperation operation, String path)
protected AbstractWebMvcEndpointHandlerMapping.ServletWebOperation wrapServletWebOperation(ExposableWebEndpoint endpoint, WebOperation operation, AbstractWebMvcEndpointHandlerMapping.ServletWebOperation servletWebOperation)
AbstractWebMvcEndpointHandlerMapping.ServletWebOperation
before
it's called. Allows additional features, such as security, to be added.endpoint
- the source endpointoperation
- the source operationservletWebOperation
- the servlet web operation to wrapprotected boolean hasCorsConfigurationSource(Object handler)
hasCorsConfigurationSource
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected CorsConfiguration initCorsConfiguration(Object handler, Method method, RequestMappingInfo mapping)
initCorsConfiguration
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected boolean isHandler(Class<?> beanType)
isHandler
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected RequestMappingInfo getMappingForMethod(Method method, Class<?> handlerType)
getMappingForMethod
in class AbstractHandlerMethodMapping<RequestMappingInfo>
protected void extendInterceptors(List<Object> interceptors)
extendInterceptors
in class AbstractHandlerMapping
protected abstract AbstractWebMvcEndpointHandlerMapping.LinksHandler getLinksHandler()
public Collection<ExposableWebEndpoint> getEndpoints()