类 AbstractWebMvcEndpointHandlerMapping
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.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping
- 所有已实现的接口:
Aware
,BeanNameAware
,InitializingBean
,ApplicationContextAware
,Ordered
,ServletContextAware
,HandlerMapping
@ImportRuntimeHints(org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping.AbstractWebMvcEndpointHandlerMappingRuntimeHints.class)
public abstract class AbstractWebMvcEndpointHandlerMapping
extends RequestMappingInfoHandlerMapping
implements InitializingBean
A custom
HandlerMapping
that makes web endpoints
available over HTTP using Spring MVC.- 从以下版本开始:
- 2.0.0
- 作者:
- Andy Wilkinson, Madhura Bhave, Phillip Webb, Brian Clozel
-
嵌套类概要
嵌套类修饰符和类型类说明protected static interface
Handler providing actuator links at the root endpoint.protected static interface
A servlet web operation that can be handled by Spring MVC. -
字段概要
从类继承的字段 org.springframework.web.servlet.handler.AbstractHandlerMapping
mappingsLogger
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
从接口继承的字段 org.springframework.web.servlet.HandlerMapping
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
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
构造器概要
构造器构造器说明AbstractWebMvcEndpointHandlerMapping
(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, boolean shouldRegisterLinksMapping) Creates a newWebEndpointHandlerMapping
that provides mappings for the operations of the givenwebEndpoints
.AbstractWebMvcEndpointHandlerMapping
(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, CorsConfiguration corsConfiguration, boolean shouldRegisterLinksMapping) Creates a newAbstractWebMvcEndpointHandlerMapping
that provides mappings for the operations of the given endpoints. -
方法概要
修饰符和类型方法说明void
protected HandlerMethod
createHandlerMethod
(Object handler, Method method) protected void
extendInterceptors
(List<Object> interceptors) Return the web endpoints being mapped.protected abstract AbstractWebMvcEndpointHandlerMapping.LinksHandler
Return the Handler providing actuator links at the root endpoint.protected RequestMappingInfo
getMappingForMethod
(Method method, Class<?> handlerType) protected boolean
hasCorsConfigurationSource
(Object handler) protected CorsConfiguration
initCorsConfiguration
(Object handler, Method method, RequestMappingInfo mapping) protected void
protected boolean
protected void
registerMapping
(ExposableWebEndpoint endpoint, WebOperationRequestPredicate predicate, WebOperation operation, String path) wrapServletWebOperation
(ExposableWebEndpoint endpoint, WebOperation operation, AbstractWebMvcEndpointHandlerMapping.ServletWebOperation servletWebOperation) Hook point that allows subclasses to wrap theAbstractWebMvcEndpointHandlerMapping.ServletWebOperation
before it's called.从类继承的方法 org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
getDirectPaths, getHandlerInternal, getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
从类继承的方法 org.springframework.web.servlet.handler.AbstractHandlerMethodMapping
detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, setPatternParser, unregisterMapping
从类继承的方法 org.springframework.web.servlet.handler.AbstractHandlerMapping
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
从类继承的方法 org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
-
构造器详细资料
-
AbstractWebMvcEndpointHandlerMapping
public AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, boolean shouldRegisterLinksMapping) Creates a newWebEndpointHandlerMapping
that provides mappings for the operations of the givenwebEndpoints
.- 参数:
endpointMapping
- the base mapping for all endpointsendpoints
- the web endpointsendpointMediaTypes
- media types consumed and produced by the endpointsshouldRegisterLinksMapping
- whether the links endpoint should be registered
-
AbstractWebMvcEndpointHandlerMapping
public AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, CorsConfiguration corsConfiguration, boolean shouldRegisterLinksMapping) Creates a newAbstractWebMvcEndpointHandlerMapping
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 ornull
shouldRegisterLinksMapping
- whether the links endpoint should be registered
-
-
方法详细资料
-
afterPropertiesSet
public void afterPropertiesSet() -
initHandlerMethods
protected void initHandlerMethods() -
createHandlerMethod
-
registerMapping
protected void registerMapping(ExposableWebEndpoint endpoint, WebOperationRequestPredicate predicate, WebOperation operation, String path) -
wrapServletWebOperation
protected AbstractWebMvcEndpointHandlerMapping.ServletWebOperation wrapServletWebOperation(ExposableWebEndpoint endpoint, WebOperation operation, AbstractWebMvcEndpointHandlerMapping.ServletWebOperation servletWebOperation) Hook point that allows subclasses to wrap theAbstractWebMvcEndpointHandlerMapping.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 wrap- 返回:
- a wrapped servlet web operation
-
hasCorsConfigurationSource
-
initCorsConfiguration
protected CorsConfiguration initCorsConfiguration(Object handler, Method method, RequestMappingInfo mapping) -
isHandler
-
getMappingForMethod
-
extendInterceptors
-
getLinksHandler
Return the Handler providing actuator links at the root endpoint.- 返回:
- the links handler
-
getEndpoints
Return the web endpoints being mapped.- 返回:
- the endpoints
-