|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
public class RequestMappingHandlerMapping
Creates RequestMappingInfo
instances from type and method-level
@RequestMapping
annotations in
@Controller
classes.
Field Summary |
---|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.web.servlet.HandlerMapping |
---|
BEST_MATCHING_PATTERN_ATTRIBUTE, INTROSPECT_TYPE_LEVEL_MAPPING, PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE, PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, URI_TEMPLATE_VARIABLES_ATTRIBUTE |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
RequestMappingHandlerMapping()
|
Method Summary | |
---|---|
protected RequestCondition<?> |
getCustomMethodCondition(Method method)
Provide a custom method-level request condition. |
protected RequestCondition<?> |
getCustomTypeCondition(Class<?> handlerType)
Provide a custom type-level request condition. |
protected RequestMappingInfo |
getMappingForMethod(Method method,
Class<?> handlerType)
Uses method and type-level @ RequestMapping annotations to create
the RequestMappingInfo. |
protected boolean |
isHandler(Class<?> beanType)
Whether the given type is a handler with handler methods. |
void |
setUseSuffixPatternMatch(boolean useSuffixPatternMatch)
Whether to use suffix pattern match (".*") when matching patterns to requests. |
void |
setUseTrailingSlashMatch(boolean useTrailingSlashMatch)
Whether to match to URLs irrespective of the presence of a trailing slash. |
boolean |
useSuffixPatternMatch()
Whether to use suffix pattern matching. |
boolean |
useTrailingSlashMatch()
Whether to match to URLs irrespective of the presence of a trailing slash. |
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 |
---|
afterPropertiesSet, detectHandlerMethods, getHandlerInternal, getHandlerMethods, handlerMethodsInitialized, initHandlerMethods, lookupHandlerMethod, registerHandlerMethod, setDetectHandlerMethodsInAncestorContexts |
Methods inherited from class org.springframework.web.servlet.handler.AbstractHandlerMapping |
---|
adaptInterceptor, detectMappedInterceptors, extendInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getMappedInterceptors, getOrder, getPathMatcher, getUrlPathHelper, initApplicationContext, initInterceptors, setAlwaysUseFullPath, setDefaultHandler, setInterceptors, setOrder, setPathMatcher, 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, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestMappingHandlerMapping()
Method Detail |
---|
public void setUseSuffixPatternMatch(boolean useSuffixPatternMatch)
The default value is true
.
public void setUseTrailingSlashMatch(boolean useTrailingSlashMatch)
The default value is true
.
public boolean useSuffixPatternMatch()
public boolean useTrailingSlashMatch()
protected boolean isHandler(Class<?> beanType)
Controller
annotation.
isHandler
in class AbstractHandlerMethodMapping<RequestMappingInfo>
beanType
- the type of the bean being checked
protected RequestMappingInfo getMappingForMethod(Method method, Class<?> handlerType)
RequestMapping
annotations to create
the RequestMappingInfo.
getMappingForMethod
in class AbstractHandlerMethodMapping<RequestMappingInfo>
method
- the method to provide a mapping forhandlerType
- the handler type, possibly a sub-type of the method's
declaring class
null
if the method
does not have a @RequestMapping
annotation.getCustomMethodCondition(Method)
,
getCustomTypeCondition(Class)
protected RequestCondition<?> getCustomMethodCondition(Method method)
RequestCondition
can be of any type so long as the
same condition type is returned from all calls to this method in order
to ensure custom request conditions can be combined and compared.
method
- the handler method for which to create the condition
null
protected RequestCondition<?> getCustomTypeCondition(Class<?> handlerType)
RequestCondition
can be of any type so long as the
same condition type is returned from all calls to this method in order
to ensure custom request conditions can be combined and compared.
handlerType
- the handler type for which to create the condition
null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |