RequestMappingInfo instances from type-level and method-level
@RequestMapping and @HttpExchange
annotations in @Controller classes.
Deprecation Note:
In 5.2.4,useSuffixPatternMatch and
useRegisteredSuffixPatternMatch
were deprecated in order to discourage use of path extensions for request
mapping and for content negotiation (with similar deprecations in
ContentNegotiationManagerFactoryBean). For further context, please read issue
#24179.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private RequestMappingInfo. | |
| private ContentNegotiationManager | |
| private boolean | |
| private StringValueResolver | |
| private static final RequestMethod[] | |
| private static final String[] | |
| private Map | |
| private boolean | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Overrides org. Implements org. Detects handler methods at initialization. |
| private RequestMappingInfo | |
| protected RequestMappingInfo | createRequestMappingInfo(RequestMapping requestMapping, RequestCondition<?> customCondition)
Create a |
| protected RequestMappingInfo | createRequestMappingInfo(HttpExchange httpExchange, RequestCondition<?> customCondition)
Create a |
| private static List | |
| public RequestMappingInfo. | Returns: the builder configuration that reflects the internal stateObtain a |
| public ContentNegotiationManager | |
| protected RequestCondition | Returns: the condition, ornullthe handler method for which to create the condition method)Provide a custom method-level request condition. |
| protected RequestCondition | Returns: the condition, ornullthe handler type for which to create the condition handlerType)Provide a custom type-level request condition. |
| public List | getFileExtensions()
Deprecated
as of 5.2.4. See class-level note on the deprecation of path
extension config options.
Return the file extensions to use for suffix pattern matching. |
| protected RequestMappingInfo | Returns: the createdRequestMappingInfo, or null if the method
does not have a @RequestMapping or @HttpExchange annotationthe method to provide a mapping for method, Class<?> the handler type, possibly a subtype of the method's
declaring class handlerType)Implements abstract org. Uses type-level and method-level |
| pack-priv String | |
| public Map | |
| protected CorsConfiguration | initCorsConfiguration(Object handler, Method method, RequestMappingInfo mappingInfo)
Overrides org. Extract and return the CORS configuration for the mapping. |
| protected boolean | isHandler(Class<?>
the type of the bean being checked beanType)Implements abstract org. Whether the given type is a handler with handler methods. |
| public RequestMatchResult | match(HttpServletRequest
the current request request, String the pattern to match pattern)Implements org. Determine whether the request matches the given pattern. |
| protected void | registerHandlerMethod(Object
the bean name of the handler or the handler instance handler, Method the method to register method, RequestMappingInfo the mapping conditions associated with the handler method mapping)Overrides org. Register a handler method and its unique mapping. |
| public void | registerMapping(RequestMappingInfo
the mapping for the handler method mapping, Object the handler handler, Method the method method)Overrides org. Register the given mapping. |
| private String | |
| protected String[] | Returns: a new array with updated patternsResolve placeholder values in the given array of patterns. |
| public void | setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set the |
| public void | setEmbeddedValueResolver(StringValueResolver resolver)
Implements org. Set the StringValueResolver to use for resolving embedded definition values. |
| public void | setPathPrefixes(Map<String, Predicate<Class<?>>>
a map with path prefixes as key prefixes)Configure path prefixes to apply to controller methods. |
| public void | setPatternParser(PathPatternParser
the parser to use patternParser)Overrides org. Set the |
| public void | setUseRegisteredSuffixPatternMatch(boolean useRegisteredSuffixPatternMatch)
Deprecated
as of 5.2.4. See class level note on the deprecation of
path extension config options.
Whether suffix pattern matching should work only against path extensions
explicitly registered with the |
| public void | setUseSuffixPatternMatch(boolean useSuffixPatternMatch)
Deprecated
as of 5.2.4.
Whether to use suffix pattern match (".*") when matching patterns to requests. |
| public void | setUseTrailingSlashMatch(boolean useTrailingSlashMatch)
Deprecated
since 6.0. as of 6.0, see
PathPatternParser#setMatchOptionalTrailingSeparator(boolean)
Whether to match to URLs irrespective of the presence of a trailing slash. |
| private static RequestMethod[] | |
| private static String[] | |
| private void | |
| private void | |
| public boolean | useRegisteredSuffixPatternMatch()
Deprecated
as of 5.2.4.
Whether to use registered suffixes for pattern matching. |
| public boolean | useSuffixPatternMatch()
Deprecated
as of 5.2.4.
Whether to use registered suffixes for pattern matching. |
| public boolean |
| config | back to summary |
|---|---|
| private RequestMappingInfo. | |
| contentNegotiationManager | back to summary |
|---|---|
| private ContentNegotiationManager contentNegotiationManager | |
| defaultPatternParser | back to summary |
|---|---|
| private boolean defaultPatternParser | |
| embeddedValueResolver | back to summary |
|---|---|
| private StringValueResolver embeddedValueResolver
| |
| EMPTY_REQUEST_METHOD_ARRAY | back to summary |
|---|---|
| private static final RequestMethod[] EMPTY_REQUEST_METHOD_ARRAY | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| private static final String[] EMPTY_STRING_ARRAY | |
| pathPrefixes | back to summary |
|---|---|
| private Map<String, Predicate<Class<?>>> pathPrefixes | |
| useRegisteredSuffixPatternMatch | back to summary |
|---|---|
| private boolean useRegisteredSuffixPatternMatch | |
| useSuffixPatternMatch | back to summary |
|---|---|
| private boolean useSuffixPatternMatch | |
| useTrailingSlashMatch | back to summary |
|---|---|
| private boolean useTrailingSlashMatch | |
| RequestMappingHandlerMapping | back to summary |
|---|---|
| public RequestMappingHandlerMapping() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Overrides org. Implements org. Doc from org. Detects handler methods at initialization.
| |
| createRequestMappingInfo | back to summary |
|---|---|
private RequestMappingInfo createRequestMappingInfo(AnnotatedElement element)
| |
| createRequestMappingInfo | back to summary |
|---|---|
| protected RequestMappingInfo createRequestMappingInfo(RequestMapping requestMapping, RequestCondition<?> customCondition) Create a | |
| createRequestMappingInfo | back to summary |
|---|---|
| protected RequestMappingInfo createRequestMappingInfo(HttpExchange httpExchange, RequestCondition<?> customCondition) Create a
| |
| getAnnotationDescriptors | back to summary |
|---|---|
| private static List | |
| getBuilderConfiguration | back to summary |
|---|---|
| public RequestMappingInfo. Obtain a This is useful for programmatic registration of request mappings via
| |
| getContentNegotiationManager | back to summary |
|---|---|
| public ContentNegotiationManager getContentNegotiationManager() Return the configured | |
| getCustomMethodCondition | back to summary |
|---|---|
| protected RequestCondition Provide a custom method-level request condition.
The custom Consider extending
| |
| getCustomTypeCondition | back to summary |
|---|---|
| protected RequestCondition Provide a custom type-level request condition.
The custom Consider extending
| |
| getFileExtensions | back to summary |
|---|---|
| public List Deprecated as of 5.2.4. See class-level note on the deprecation of path extension config options. Return the file extensions to use for suffix pattern matching.
| |
| getMappingForMethod | back to summary |
|---|---|
| protected RequestMappingInfo getMappingForMethod(Method method, Class<?> handlerType) Implements abstract org. Uses type-level and method-level
| |
| getPathPrefix | back to summary |
|---|---|
pack-priv String getPathPrefix(Class<?> handlerType)
| |
| getPathPrefixes | back to summary |
|---|---|
| public Map The configured path prefixes as a read-only, possibly empty map.
| |
| initCorsConfiguration | back to summary |
|---|---|
| protected CorsConfiguration initCorsConfiguration(Object handler, Method method, RequestMappingInfo mappingInfo) Overrides org. Doc from org. Extract and return the CORS configuration for the mapping.
| |
| isHandler | back to summary |
|---|---|
| protected boolean isHandler(Class<?> beanType) Implements abstract org. Doc from org. Whether the given type is a handler with handler methods. Expects a handler to have a type-level @ | |
| match | back to summary |
|---|---|
| public RequestMatchResult match(HttpServletRequest request, String pattern) Implements org. Doc from org. Determine whether the request matches the given pattern. Use this method
when
| |
| registerHandlerMethod | back to summary |
|---|---|
| protected void registerHandlerMethod(Object handler, Method method, RequestMappingInfo mapping) Overrides org. Doc from org. Register a handler method and its unique mapping. Invoked at startup for each detected handler method. Note To create the
| |
| registerMapping | back to summary |
|---|---|
| public void registerMapping(RequestMappingInfo mapping, Object handler, Method method) Overrides org. Doc from org. Register the given mapping. This method may be invoked at runtime after initialization has completed.
| |
| resolveCorsAnnotationValue | back to summary |
|---|---|
| private String resolveCorsAnnotationValue(String value) | |
| resolveEmbeddedValuesInPatterns | back to summary |
|---|---|
| protected String[] resolveEmbeddedValuesInPatterns(String[] patterns) Resolve placeholder values in the given array of patterns.
| |
| setContentNegotiationManager | back to summary |
|---|---|
| public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) Set the | |
| setEmbeddedValueResolver | back to summary |
|---|---|
| public void setEmbeddedValueResolver(StringValueResolver resolver) Implements org. Doc from org. Set the StringValueResolver to use for resolving embedded definition values.
| |
| setPathPrefixes | back to summary |
|---|---|
| public void setPathPrefixes(Map<String, Predicate<Class<?>>> prefixes) Configure path prefixes to apply to controller methods. Prefixes are used to enrich the mappings of every Consider using | |
| setPatternParser | back to summary |
|---|---|
| public void setPatternParser(PathPatternParser patternParser) Overrides org. Doc from org. Set the Note: This property is mutually exclusive with the
below properties, all of which are not necessary for parsed patterns and
are ignored when a
By default, as of 6.0, this is set to a
| |
| setUseRegisteredSuffixPatternMatch | back to summary |
|---|---|
| public void setUseRegisteredSuffixPatternMatch(boolean useRegisteredSuffixPatternMatch)
Deprecated as of 5.2.4. See class level note on the deprecation of path extension config options. Whether suffix pattern matching should work only against path extensions
explicitly registered with the By default this is set to "false". Note This property is ignored when
| |
| setUseSuffixPatternMatch | back to summary |
|---|---|
| public void setUseSuffixPatternMatch(boolean useSuffixPatternMatch)
Deprecated as of 5.2.4. See class level note on the deprecation of
path extension config options. As there is no replacement for this method,
in 5.2.x it is necessary to set it to Whether to use suffix pattern match (".*") when matching patterns to requests. If enabled a method mapped to "/users" also matches to "/users.*". By default value this is set to Also see Note This property is ignored when
| |
| setUseTrailingSlashMatch | back to summary |
|---|---|
| public void setUseTrailingSlashMatch(boolean useTrailingSlashMatch)
Whether to match to URLs irrespective of the presence of a trailing slash. If enabled a method mapped to "/users" also matches to "/users/". The default was changed in 6.0 from
| |
| toMethodArray | back to summary |
|---|---|
| private static RequestMethod[] toMethodArray(String method) | |
| toStringArray | back to summary |
|---|---|
| private static String[] toStringArray(String value) | |
| updateConsumesCondition | back to summary |
|---|---|
| private void updateConsumesCondition(RequestMappingInfo info, Method method) | |
| updateCorsConfig | back to summary |
|---|---|
| private void updateCorsConfig(CorsConfiguration config, CrossOrigin annotation) | |
| useRegisteredSuffixPatternMatch | back to summary |
|---|---|
| public boolean useRegisteredSuffixPatternMatch()
Deprecated as of 5.2.4. See deprecation notice on
Whether to use registered suffixes for pattern matching.
| |
| useSuffixPatternMatch | back to summary |
|---|---|
| public boolean useSuffixPatternMatch()
Deprecated as of 5.2.4. See deprecation notice on
Whether to use registered suffixes for pattern matching.
| |
| useTrailingSlashMatch | back to summary |
|---|---|
| public boolean useTrailingSlashMatch() Whether to match to URLs irrespective of the presence of a trailing slash. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Annotation | |
| private final MergedAnnotation |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public String |
| annotation | back to summary |
|---|---|
| private final Annotation annotation | |
| root | back to summary |
|---|---|
| private final MergedAnnotation<?> root | |
| AnnotationDescriptor | back to summary |
|---|---|
| pack-priv AnnotationDescriptor(MergedAnnotation<Annotation> mergedAnnotation) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |