接口 HandlerMethodMappingNamingStrategy<T>
- 类型参数:
T
- the mapping type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface HandlerMethodMappingNamingStrategy<T>
A strategy for assigning a name to a handler method's mapping.The strategy can be configured on
AbstractHandlerMethodMapping
. It is used to assign a name to the mapping of every registered handler method. The names can then be queried viaAbstractHandlerMethodMapping#getHandlerMethodsForMappingName
.Applications can build a URL to a controller method by name with the help of the static method
MvcUriComponentsBuilder#fromMappingName
or in JSPs through the "mvcUrl" function registered by the Spring tag library.- 从以下版本开始:
- 4.1
- 作者:
- Rossen Stoyanchev
方法详细资料
getName
String getName(HandlerMethod handlerMethod, T mapping)
Determine the name for the given HandlerMethod and mapping.- 参数:
handlerMethod
- the handler methodmapping
- the mapping- 返回:
- the name