类 PropertiesMethodNameResolver
- java.lang.Object
- org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
- org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver
- 所有已实现的接口:
InitializingBean
,MethodNameResolver
@Deprecated public class PropertiesMethodNameResolver extends AbstractUrlMethodNameResolver implements InitializingBean
已过时。as of 4.3, in favor of annotation-driven handler methodsThe most flexible out-of-the-box implementation of theMethodNameResolver
interface. Usesjava.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.
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
Properties
,AntPathMatcher
字段概要
从类继承的字段 org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
logger
构造器概要
构造器 构造器 说明 PropertiesMethodNameResolver()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
已过时。Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.protected String
getHandlerMethodNameForUrlPath(String urlPath)
已过时。Return a method name that can handle this request, based on the given lookup path.void
setMappings(Properties mappings)
已过时。Set explicit URL to method name mappings through a Properties object.void
setPathMatcher(PathMatcher pathMatcher)
已过时。Set the PathMatcher implementation to use for matching URL paths against registered URL patterns.从类继承的方法 org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
getHandlerMethodName, setAlwaysUseFullPath, setUrlDecode, setUrlPathHelper
构造器详细资料
PropertiesMethodNameResolver
public PropertiesMethodNameResolver()
已过时。
方法详细资料
setMappings
public void setMappings(Properties mappings)
已过时。Set explicit URL to method name mappings through a Properties object.- 参数:
mappings
- Properties with URL as key and method name as value
setPathMatcher
public void setPathMatcher(PathMatcher pathMatcher)
已过时。Set the PathMatcher implementation to use for matching URL paths against registered URL patterns. Default is AntPathMatcher.- 另请参阅:
AntPathMatcher
afterPropertiesSet
public void afterPropertiesSet()
已过时。从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,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
在接口中InitializingBean
getHandlerMethodNameForUrlPath
protected String getHandlerMethodNameForUrlPath(String urlPath)
已过时。从类复制的说明:AbstractUrlMethodNameResolver
Return a method name that can handle this request, based on the given lookup path. Called bygetHandlerMethodName
.- 指定者:
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.
- 另请参阅:
AbstractUrlMethodNameResolver.getHandlerMethodName(javax.servlet.http.HttpServletRequest)
,AbstractUrlMethodNameResolver.setAlwaysUseFullPath(boolean)
,AbstractUrlMethodNameResolver.setUrlDecode(boolean)