接口 HandlerMethodMappingNamingStrategy<T>

类型参数:
T - the mapping type
所有已知实现类:
RequestMappingInfoHandlerMethodMappingNamingStrategy
函数接口:
这是一个函数接口, 因此可用作 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 via AbstractHandlerMethodMapping#getHandlerMethodsForMappingName.

Applications can build a URL to a controller method by name with the help of the static method MvcUriComponentsBuilder#fromMappingName

从以下版本开始:
4.0 2022/4/1 21:58
作者:
Rossen Stoyanchev, Harry Yang
  • 方法概要

    修饰符和类型
    方法
    说明
    getName(HandlerMethod handlerMethod, T mapping)
    Determine the name for the given HandlerMethod and mapping.
  • 方法详细资料

    • getName

      String getName(HandlerMethod handlerMethod, T mapping)
      Determine the name for the given HandlerMethod and mapping.
      参数:
      handlerMethod - the handler method
      mapping - the mapping
      返回:
      the name