Class WebMvcEndpointHandlerMapping
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.handler.AbstractHandlerMapping
org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<RequestMappingInfo>
org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
org.springframework.boot.webmvc.actuate.endpoint.web.AbstractWebMvcEndpointHandlerMapping
org.springframework.boot.webmvc.actuate.endpoint.web.WebMvcEndpointHandlerMapping
- All Implemented Interfaces:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, Ordered, ServletContextAware, HandlerMapping
@ImportRuntimeHints(org.springframework.boot.webmvc.actuate.endpoint.web.WebMvcEndpointHandlerMapping.WebMvcEndpointHandlerMappingRuntimeHints.class)
public class WebMvcEndpointHandlerMapping
extends AbstractWebMvcEndpointHandlerMapping
A custom
HandlerMapping that makes web endpoints available over HTTP using
Spring MVC.- Since:
- 4.0.0
- Author:
- Andy Wilkinson, Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractWebMvcEndpointHandlerMapping
AbstractWebMvcEndpointHandlerMapping.LinksHandler, AbstractWebMvcEndpointHandlerMapping.ServletWebOperation -
Field Summary
Fields inherited from class AbstractHandlerMapping
mappingsLoggerFields inherited from class ApplicationObjectSupport
loggerFields inherited from interface HandlerMapping
API_VERSION_ATTRIBUTE, 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_ATTRIBUTEFields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, @Nullable CorsConfiguration corsConfiguration, EndpointLinksResolver linksResolver, boolean shouldRegisterLinksMapping) Creates a newWebMvcEndpointHandlerMappinginstance that provides mappings for the given endpoints. -
Method Summary
Modifier and TypeMethodDescriptionReturn the Handler providing actuator links at the root endpoint.Methods inherited from class AbstractWebMvcEndpointHandlerMapping
afterPropertiesSet, createHandlerMethod, getCorsConfiguration, getEndpoints, getMappingForMethod, hasCorsConfigurationSource, initCorsConfiguration, initHandlerMethods, isHandler, registerMapping, wrapServletWebOperationMethods inherited from class RequestMappingInfoHandlerMapping
getDirectPaths, getHandlerInternal, getMappingComparator, getMatchingMapping, handleMatch, handleNoMatchMethods inherited from class AbstractHandlerMethodMapping
detectHandlerMethods, getCandidateBeanNames, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setPatternParser, unregisterMappingMethods inherited from class AbstractHandlerMapping
adaptInterceptor, detectMappedInterceptors, extendInterceptors, formatMappingName, getAdaptedInterceptors, getApiVersionStrategy, getCorsConfigurationSource, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getPatternParser, getUrlPathHelper, initApplicationContext, initInterceptors, initLookupPath, setAlwaysUseFullPath, setApiVersionStrategy, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper, usesPathPatternsMethods inherited from class WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextMethods inherited from class ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Constructor Details
-
WebMvcEndpointHandlerMapping
public WebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, @Nullable CorsConfiguration corsConfiguration, EndpointLinksResolver linksResolver, boolean shouldRegisterLinksMapping) Creates a newWebMvcEndpointHandlerMappinginstance that provides mappings for the given endpoints.- Parameters:
endpointMapping- the base mapping for all endpointsendpoints- the web endpointsendpointMediaTypes- media types consumed and produced by the endpointscorsConfiguration- the CORS configuration for the endpoints ornulllinksResolver- resolver for determining links to available endpointsshouldRegisterLinksMapping- whether the links endpoint should be registered
-
-
Method Details
-
getLinksHandler
Description copied from class:AbstractWebMvcEndpointHandlerMappingReturn the Handler providing actuator links at the root endpoint.- Specified by:
getLinksHandlerin classAbstractWebMvcEndpointHandlerMapping- Returns:
- the links handler
-