@Deprecated public abstract class AbstractUrlMethodNameResolver extends Object implements MethodNameResolver
MethodNameResolver
implementations.
Provides infrastructure for mapping handlers to URLs and configurable
URL lookup. For information on the latter, see the
setAlwaysUseFullPath(boolean)
"alwaysUseFullPath"}
and "urlDecode"
properties.
Modifier and Type | Field and Description |
---|---|
protected Log |
logger
Deprecated.
Logger available to subclasses
|
Constructor and Description |
---|
AbstractUrlMethodNameResolver()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getHandlerMethodName(HttpServletRequest request)
Deprecated.
Retrieves the URL path to use for lookup and delegates to
getHandlerMethodNameForUrlPath . |
protected abstract String |
getHandlerMethodNameForUrlPath(String urlPath)
Deprecated.
Return a method name that can handle this request, based on the
given lookup path.
|
void |
setAlwaysUseFullPath(boolean alwaysUseFullPath)
Deprecated.
Set if URL lookup should always use full path within current servlet
context.
|
void |
setUrlDecode(boolean urlDecode)
Deprecated.
Set if context path and request URI should be URL-decoded.
|
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Deprecated.
Set the UrlPathHelper to use for resolution of lookup paths.
|
protected final Log logger
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
public void setUrlDecode(boolean urlDecode)
Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
UrlPathHelper.setUrlDecode(boolean)
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings.
public final String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException
getHandlerMethodNameForUrlPath
.
Converts null
values to NoSuchRequestHandlingMethodExceptions.getHandlerMethodName
in interface MethodNameResolver
request
- current HTTP requestnull
; throws exception if not resolvable.NoSuchRequestHandlingMethodException
- if no handler method
can be found for the given requestgetHandlerMethodNameForUrlPath(java.lang.String)
protected abstract String getHandlerMethodNameForUrlPath(String urlPath)
getHandlerMethodName
.urlPath
- the URL path to use for lookup,
according to the settings in this classgetHandlerMethodName(javax.servlet.http.HttpServletRequest)
,
setAlwaysUseFullPath(boolean)
,
setUrlDecode(boolean)