public class HandlerMappingIntrospector extends Object implements CorsConfigurationSource, ApplicationContextAware, InitializingBean
HandlerMapping that would
 serve a specific request.
 Provides the following methods:
getMatchableHandlerMapping(javax.servlet.http.HttpServletRequest) — obtain a HandlerMapping
 to check request-matching criteria against.
 getCorsConfiguration(javax.servlet.http.HttpServletRequest) — obtain the CORS configuration for the
 request.
 | Constructor and Description | 
|---|
| HandlerMappingIntrospector()Constructor for use with  ApplicationContextAware. | 
| HandlerMappingIntrospector(ApplicationContext context)Deprecated. 
 as of 4.3.12, in favor of  setApplicationContext(org.springframework.context.ApplicationContext) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet()Invoked by the containing  BeanFactoryafter it has set all bean properties
 and satisfiedBeanFactoryAware,ApplicationContextAwareetc. | 
| CorsConfiguration | getCorsConfiguration(HttpServletRequest request)Return a  CorsConfigurationbased on the incoming request. | 
| List<HandlerMapping> | getHandlerMappings()Return the configured HandlerMapping's. | 
| MatchableHandlerMapping | getMatchableHandlerMapping(HttpServletRequest request)Find the  HandlerMappingthat would handle the given request and
 return it as aMatchableHandlerMappingthat can be used to test
 request-matching criteria. | 
| void | setApplicationContext(ApplicationContext applicationContext)Set the ApplicationContext that this object runs in. | 
public HandlerMappingIntrospector()
ApplicationContextAware.@Deprecated public HandlerMappingIntrospector(ApplicationContext context)
setApplicationContext(org.springframework.context.ApplicationContext)HandlerMappings in the
 given ApplicationContext or falls back on
 "DispatcherServlet.properties" like the DispatcherServlet.public List<HandlerMapping> getHandlerMappings()
public void setApplicationContext(ApplicationContext applicationContext)
ApplicationContextAwareInvoked after population of normal bean properties but before an init callback such
 as InitializingBean.afterPropertiesSet()
 or a custom init-method. Invoked after ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader),
 ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) and
 MessageSourceAware, if applicable.
setApplicationContext in interface ApplicationContextAwareapplicationContext - the ApplicationContext object to be used by this objectBeanInitializationExceptionpublic void afterPropertiesSet()
InitializingBeanBeanFactory after it has set all bean properties
 and satisfied BeanFactoryAware, ApplicationContextAware etc.
 This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet in interface InitializingBean@Nullable public MatchableHandlerMapping getMatchableHandlerMapping(HttpServletRequest request) throws Exception
HandlerMapping that would handle the given request and
 return it as a MatchableHandlerMapping that can be used to test
 request-matching criteria.
 If the matching HandlerMapping is not an instance of
 MatchableHandlerMapping, an IllegalStateException is raised.
request - the current requestnullException - if any of the HandlerMapping's raise an exception@Nullable public CorsConfiguration getCorsConfiguration(HttpServletRequest request)
CorsConfigurationSourceCorsConfiguration based on the incoming request.getCorsConfiguration in interface CorsConfigurationSourceCorsConfiguration, or null if none