@Deprecated public class PropertiesMethodNameResolver extends AbstractUrlMethodNameResolver implements InitializingBean
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.
Properties
,
AntPathMatcher
logger
Constructor and Description |
---|
PropertiesMethodNameResolver()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware , ApplicationContextAware etc. |
protected java.lang.String |
getHandlerMethodNameForUrlPath(java.lang.String urlPath)
Deprecated.
Return a method name that can handle this request, based on the
given lookup path.
|
void |
setMappings(java.util.Properties mappings)
Deprecated.
Set explicit URL to method name mappings through a Properties object.
|
void |
setPathMatcher(PathMatcher pathMatcher)
Deprecated.
Set the PathMatcher implementation to use for matching URL paths
against registered URL patterns.
|
getHandlerMethodName, setAlwaysUseFullPath, setUrlDecode, setUrlPathHelper
public void setMappings(java.util.Properties mappings)
mappings
- Properties with URL as key and method name as valuepublic void setPathMatcher(PathMatcher pathMatcher)
AntPathMatcher
public void afterPropertiesSet()
InitializingBean
BeanFactory
after it has set all bean properties
and satisfied BeanFactoryAware
, ApplicationContextAware
etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet
in interface InitializingBean
protected java.lang.String getHandlerMethodNameForUrlPath(java.lang.String urlPath)
AbstractUrlMethodNameResolver
getHandlerMethodName
.getHandlerMethodNameForUrlPath
in class AbstractUrlMethodNameResolver
urlPath
- the URL path to use for lookup,
according to the settings in this classAbstractUrlMethodNameResolver.getHandlerMethodName(javax.servlet.http.HttpServletRequest)
,
AbstractUrlMethodNameResolver.setAlwaysUseFullPath(boolean)
,
AbstractUrlMethodNameResolver.setUrlDecode(boolean)