| |
|
| java.lang.Object org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver org.springframework.web.servlet.mvc.multiaction.InternalPathMethodNameResolver
InternalPathMethodNameResolver | public class InternalPathMethodNameResolver extends AbstractUrlMethodNameResolver (Code) | | Simple implementation of
MethodNameResolver that maps URL to
method name. Although this is the default implementation used by the
MultiActionController 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.
author: Rod Johnson author: Juergen Hoeller |
Method Summary | |
protected String | extractHandlerMethodNameFromUrlPath(String uri) Extract the handler method name from the given request URI.
Delegates to WebUtils.extractViewNameFromUrlPath(String) .
Parameters: uri - the request URI (e.g. | 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. | 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. | 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. |
getPrefix | protected String getPrefix()(Code) | | Return the common prefix for handler method names.
|
getSuffix | protected String getSuffix()(Code) | | Return the common suffix for handler method names.
|
postProcessHandlerMethodName | protected String postProcessHandlerMethodName(String methodName)(Code) | | 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.
Parameters: methodName - the original method name, as indicated by the URL path the full method name to use See Also: InternalPathMethodNameResolver.getPrefix() See Also: InternalPathMethodNameResolver.getSuffix() |
setPrefix | public void setPrefix(String prefix)(Code) | | 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)(Code) | | 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".
|
Fields inherited from org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver | final protected Log logger(Code)(Java Doc)
|
|
|
|