Class ControllerEndpointHandlerMapping
- 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.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
- org.springframework.boot.actuate.endpoint.web.servlet.ControllerEndpointHandlerMapping
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.context.EmbeddedValueResolverAware
,org.springframework.core.Ordered
,org.springframework.web.context.ServletContextAware
,org.springframework.web.servlet.handler.MatchableHandlerMapping
,org.springframework.web.servlet.HandlerMapping
public class ControllerEndpointHandlerMapping extends org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
HandlerMapping
that exposes@ControllerEndpoint
and@RestControllerEndpoint
annotated endpoints over Spring MVC.- Since:
- 2.0.0
Field Summary
Fields inherited from interface org.springframework.web.servlet.HandlerMapping
BEST_MATCHING_HANDLER_ATTRIBUTE, BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, MATRIX_VARIABLES_ATTRIBUTE, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE
Constructor Summary
Constructors Constructor Description ControllerEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableControllerEndpoint> endpoints, org.springframework.web.cors.CorsConfiguration corsConfiguration)
Create a newControllerEndpointHandlerMapping
instance providing mappings for the specified endpoints.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
extendInterceptors(List<Object> interceptors)
protected org.springframework.web.cors.CorsConfiguration
initCorsConfiguration(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
protected void
initHandlerMethods()
protected void
registerHandlerMethod(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
afterPropertiesSet, createRequestMappingInfo, getContentNegotiationManager, getCustomMethodCondition, getCustomTypeCondition, getFileExtensions, getMappingForMethod, getPathPrefixes, isHandler, match, resolveEmbeddedValuesInPatterns, setContentNegotiationManager, setEmbeddedValueResolver, setPathPrefixes, setUseRegisteredSuffixPatternMatch, setUseSuffixPatternMatch, setUseTrailingSlashMatch, useRegisteredSuffixPatternMatch, useSuffixPatternMatch, useTrailingSlashMatch
Methods inherited from class org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping
getMappingComparator, getMappingPathPatterns, getMatchingMapping, handleMatch, handleNoMatch
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMethodMapping
createHandlerMethod, detectHandlerMethods, getCandidateBeanNames, getCorsConfiguration, getHandlerInternal, getHandlerMethods, getHandlerMethodsForMappingName, getNamingStrategy, handlerMethodsInitialized, lookupHandlerMethod, processCandidateBean, registerMapping, setDetectHandlerMethodsInAncestorContexts, setHandlerMethodMappingNamingStrategy, unregisterMapping
Methods inherited from class 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
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContext
Constructor Detail
ControllerEndpointHandlerMapping
public ControllerEndpointHandlerMapping(EndpointMapping endpointMapping, Collection<ExposableControllerEndpoint> endpoints, org.springframework.web.cors.CorsConfiguration corsConfiguration)
Create a newControllerEndpointHandlerMapping
instance providing mappings for the specified endpoints.- Parameters:
endpointMapping
- the base mapping for all endpointsendpoints
- the web endpointscorsConfiguration
- the CORS configuration for the endpoints ornull
Method Detail
initHandlerMethods
protected void initHandlerMethods()
- Overrides:
initHandlerMethods
in classorg.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
registerHandlerMethod
protected void registerHandlerMethod(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
- Overrides:
registerHandlerMethod
in classorg.springframework.web.servlet.handler.AbstractHandlerMethodMapping<org.springframework.web.servlet.mvc.method.RequestMappingInfo>
initCorsConfiguration
protected org.springframework.web.cors.CorsConfiguration initCorsConfiguration(Object handler, Method method, org.springframework.web.servlet.mvc.method.RequestMappingInfo mapping)
- Overrides:
initCorsConfiguration
in classorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
extendInterceptors
protected void extendInterceptors(List<Object> interceptors)
- Overrides:
extendInterceptors
in classorg.springframework.web.servlet.handler.AbstractHandlerMapping