类 AbstractUrlMethodNameResolver
- java.lang.Object
- org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
- 所有已实现的接口:
MethodNameResolver
@Deprecated public abstract class AbstractUrlMethodNameResolver extends Object implements MethodNameResolver
已过时。as of 4.3, in favor of annotation-driven handler methodsAbstract base class for URL-basedMethodNameResolver
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.- 从以下版本开始:
- 14.01.2004
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 AbstractUrlMethodNameResolver()
已过时。
方法概要
所有方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 String
getHandlerMethodName(HttpServletRequest request)
已过时。Retrieves the URL path to use for lookup and delegates togetHandlerMethodNameForUrlPath
.protected abstract String
getHandlerMethodNameForUrlPath(String urlPath)
已过时。Return a method name that can handle this request, based on the given lookup path.void
setAlwaysUseFullPath(boolean alwaysUseFullPath)
已过时。Set if URL lookup should always use full path within current servlet context.void
setUrlDecode(boolean urlDecode)
已过时。Set if context path and request URI should be URL-decoded.void
setUrlPathHelper(UrlPathHelper urlPathHelper)
已过时。Set the UrlPathHelper to use for resolution of lookup paths.
构造器详细资料
AbstractUrlMethodNameResolver
public AbstractUrlMethodNameResolver()
已过时。
方法详细资料
setAlwaysUseFullPath
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
已过时。Set if URL lookup should always use full path within current servlet context. Else, the path within the current servlet mapping is used if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml). Default is "false".
setUrlDecode
public void setUrlDecode(boolean urlDecode)
已过时。Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path.Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
已过时。Set the UrlPathHelper to use for resolution of lookup paths.Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings.
getHandlerMethodName
public final String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException
已过时。Retrieves the URL path to use for lookup and delegates togetHandlerMethodNameForUrlPath
. Convertsnull
values to NoSuchRequestHandlingMethodExceptions.- 指定者:
getHandlerMethodName
在接口中MethodNameResolver
- 参数:
request
- current HTTP request- 返回:
- a method name that can handle this request. Never returns
null
; throws exception if not resolvable. - 抛出:
NoSuchRequestHandlingMethodException
- if no handler method can be found for the given request- 另请参阅:
getHandlerMethodNameForUrlPath(java.lang.String)
getHandlerMethodNameForUrlPath
protected abstract String getHandlerMethodNameForUrlPath(String urlPath)
已过时。Return a method name that can handle this request, based on the given lookup path. Called bygetHandlerMethodName
.- 参数:
urlPath
- the URL path to use for lookup, according to the settings in this class- 返回:
- a method name that can handle this request. Should return null if no matching method found.
- 另请参阅:
getHandlerMethodName(javax.servlet.http.HttpServletRequest)
,setAlwaysUseFullPath(boolean)
,setUrlDecode(boolean)