java.lang.Object | ||
↳ | org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver | |
↳ | org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver |
The most flexible out-of-the-box implementation of the MethodNameResolver
interface. Uses java.util.Properties
to define the mapping
between the URL of incoming requests and the corresponding method name.
Such properties can be held in an XML document.
Properties format is
/welcome.html=displayGenresPage
Note that method overloading isn't allowed, so there's no need to
specify arguments.
Supports direct matches, e.g. a registered "/test" matches "/test", and a various Ant-style pattern matches, e.g. a registered "/t*" matches both "/test" and "/team". For details, see the AntPathMatcher javadoc.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Set explicit URL to method name mappings through a Properties object.
| |||||||||||
Set the PathMatcher implementation to use for matching URL paths
against registered URL patterns.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a method name that can handle this request, based on the
given lookup path.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.web.servlet.mvc.multiaction.MethodNameResolver
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
Set explicit URL to method name mappings through a Properties object.
mappings | Properties with URL as key and method name as value |
---|
Set the PathMatcher implementation to use for matching URL paths against registered URL patterns. Default is AntPathMatcher.
Return a method name that can handle this request, based on the
given lookup path. Called by getHandlerMethodName
.
urlPath | the URL path to use for lookup, according to the settings in this class |
---|