类 InternalPathMethodNameResolver
- java.lang.Object
- org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
- org.springframework.web.servlet.mvc.multiaction.InternalPathMethodNameResolver
- 所有已实现的接口:
MethodNameResolver
@Deprecated public class InternalPathMethodNameResolver extends AbstractUrlMethodNameResolver
已过时。as of 4.3, in favor of annotation-driven handler methodsSimple implementation ofMethodNameResolver
that maps URL to method name. Although this is the default implementation used by theMultiActionController
class (because it requires no configuration), it's bit naive for most applications. In particular, we don't usually want to tie URL to implementation methods.Maps the resource name after the last slash, ignoring an extension. E.g. "/foo/bar/baz.html" to "baz", assuming a "/foo/bar/baz.html" controller mapping to the corresponding MultiActionController handler. method. Doesn't support wildcards.
- 作者:
- Rod Johnson, Juergen Hoeller
字段概要
从类继承的字段 org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
logger
构造器概要
构造器 构造器 说明 InternalPathMethodNameResolver()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected String
extractHandlerMethodNameFromUrlPath(String uri)
已过时。Extract the handler method name from the given request URI.protected String
getHandlerMethodNameForUrlPath(String urlPath)
已过时。Extracts the method name indicated by the URL path.protected String
getPrefix()
已过时。Return the common prefix for handler method names.protected String
getSuffix()
已过时。Return the common suffix for handler method names.protected String
postProcessHandlerMethodName(String methodName)
已过时。Build the full handler method name based on the given method name as indicated by the URL path.void
setPrefix(String prefix)
已过时。Specify a common prefix for handler method names.void
setSuffix(String suffix)
已过时。Specify a common suffix for handler method names.从类继承的方法 org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
getHandlerMethodName, setAlwaysUseFullPath, setUrlDecode, setUrlPathHelper
构造器详细资料
InternalPathMethodNameResolver
public InternalPathMethodNameResolver()
已过时。
方法详细资料
setPrefix
public void setPrefix(String prefix)
已过时。Specify a common prefix for handler method names. Will be prepended to the internal path found in the URL: e.g. internal path "baz", prefix "my" -> method name "mybaz".
setSuffix
public void setSuffix(String suffix)
已过时。Specify a common suffix for handler method names. Will be appended to the internal path found in the URL: e.g. internal path "baz", suffix "Handler" -> method name "bazHandler".
getHandlerMethodNameForUrlPath
protected String getHandlerMethodNameForUrlPath(String urlPath)
已过时。Extracts the method name indicated by the URL path.- 指定者:
getHandlerMethodNameForUrlPath
在类中AbstractUrlMethodNameResolver
- 参数:
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.
- 另请参阅:
extractHandlerMethodNameFromUrlPath(java.lang.String)
,postProcessHandlerMethodName(java.lang.String)
extractHandlerMethodNameFromUrlPath
protected String extractHandlerMethodNameFromUrlPath(String uri)
已过时。Extract the handler method name from the given request URI. Delegates toWebUtils.extractFilenameFromUrlPath(String)
.- 参数:
uri
- the request URI (e.g. "/index.html")- 返回:
- the extracted URI filename (e.g. "index")
- 另请参阅:
WebUtils.extractFilenameFromUrlPath(java.lang.String)
postProcessHandlerMethodName
protected String postProcessHandlerMethodName(String methodName)
已过时。Build the full handler method name based on the given method name as indicated by the URL path.The default implementation simply applies prefix and suffix. This can be overridden, for example, to manipulate upper case / lower case, etc.
- 参数:
methodName
- the original method name, as indicated by the URL path- 返回:
- the full method name to use
- 另请参阅:
getPrefix()
,getSuffix()