类 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<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
- org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
- org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.core.Ordered
,org.springframework.web.context.ServletContextAware
,org.springframework.web.servlet.handler.MatchableHandlerMapping
,org.springframework.web.servlet.HandlerMapping
- 直接已知子类:
WebMvcEndpointHandlerMapping
public abstract class AbstractWebMvcEndpointHandlerMapping extends org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping implements org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.handler.MatchableHandlerMapping
A customHandlerMapping
that makesweb endpoints
available over HTTP using Spring MVC.- 从以下版本开始:
- 2.0.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 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.
构造器概要
构造器 构造器 说明 AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes)
Creates a newWebEndpointHandlerMapping
that provides mappings for the operations of the givenwebEndpoints
.AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, org.springframework.web.cors.CorsConfiguration corsConfiguration)
Creates a newAbstractWebMvcEndpointHandlerMapping
that provides mappings for the operations of the given endpoints.
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected org.springframework.web.method.HandlerMethod
createHandlerMethod(Object handler, Method method)
protected void
extendInterceptors(List<Object> interceptors)
Collection<ExposableWebEndpoint>
getEndpoints()
Return the web endpoints being mapped.protected abstract AbstractWebMvcEndpointHandlerMapping.LinksHandler
getLinksHandler()
Return the Handler providing actuator links at the root endpoint.protected org.springframework.web.servlet.mvc.method.RequestMappingInfo
getMappingForMethod(Method method, Class<?> handlerType)
protected org.springframework.web.cors.CorsConfiguration
initCorsConfiguration(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
protected void
initHandlerMethods()
protected boolean
isHandler(Class<?> beanType)
org.springframework.web.servlet.handler.RequestMatchResult
match(javax.servlet.http.HttpServletRequest request, String pattern)
protected AbstractWebMvcEndpointHandlerMapping.ServletWebOperation
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
getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
从类继承的方法 org.springframework.web.servlet.handler.AbstractHandlerMethodMapping
afterPropertiesSet, detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerInternal, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, lookupHandlerMethod, processCandidateBean, registerHandlerMethod, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, unregisterMapping
从类继承的方法 org.springframework.web.servlet.handler.AbstractHandlerMapping
adaptInterceptor, detectMappedInterceptors, formatMappingName, getAdaptedInterceptors, getCorsConfigurations, getCorsHandlerExecutionChain, getCorsProcessor, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initApplicationContext, initInterceptors, setAlwaysUseFullPath, setBeanName, setCorsConfigurations, setCorsConfigurationSource, setCorsProcessor, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelper
从类继承的方法 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)
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 endpoints
AbstractWebMvcEndpointHandlerMapping
public AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableWebEndpoint> endpoints, EndpointMediaTypes endpointMediaTypes, org.springframework.web.cors.CorsConfiguration corsConfiguration)
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
方法详细资料
initHandlerMethods
protected void initHandlerMethods()
- 覆盖:
initHandlerMethods
在类中org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
createHandlerMethod
protected org.springframework.web.method.HandlerMethod createHandlerMethod(Object handler, Method method)
- 覆盖:
createHandlerMethod
在类中org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
match
public org.springframework.web.servlet.handler.RequestMatchResult match(javax.servlet.http.HttpServletRequest request, String pattern)
- 指定者:
match
在接口中org.springframework.web.servlet.handler.MatchableHandlerMapping
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
initCorsConfiguration
protected org.springframework.web.cors.CorsConfiguration initCorsConfiguration(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
- 覆盖:
initCorsConfiguration
在类中org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
isHandler
protected boolean isHandler(Class<?> beanType)
- 指定者:
isHandler
在类中org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
getMappingForMethod
protected org.springframework.web.servlet.mvc.method.RequestMappingInfo getMappingForMethod(Method method, Class<?> handlerType)
- 指定者:
getMappingForMethod
在类中org.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
extendInterceptors
protected void extendInterceptors(List<Object> interceptors)
- 覆盖:
extendInterceptors
在类中org.springframework.web.servlet.handler.AbstractHandlerMapping
getLinksHandler
protected abstract AbstractWebMvcEndpointHandlerMapping.LinksHandler getLinksHandler()
Return the Handler providing actuator links at the root endpoint.- 返回:
- the links handler
getEndpoints
public Collection<ExposableWebEndpoint> getEndpoints()
Return the web endpoints being mapped.- 返回:
- the endpoints