Top Description Methods
org.springframework.web.servlet.handler

public Interface HandlerMethodMappingNamingStrategy<T>

Known Direct Implementers
org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMethodMappingNamingStrategy
Annotations
@FunctionalInterface
Type Parameters
<T>
the mapping type
Imports
org.springframework.web.method.HandlerMethod

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 or in JSPs through the "mvcUrl" function registered by the Spring tag library.

Author
Rossen Stoyanchev
Since
4.1

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name
getName
(HandlerMethod
the handler method
handlerMethod
,
T
the mapping
mapping
)

Determine the name for the given HandlerMethod and mapping.

Method Detail

getNameback to summary
public String getName(HandlerMethod handlerMethod, T mapping)

Determine the name for the given HandlerMethod and mapping.

Parameters
handlerMethod:HandlerMethod

the handler method

mapping:T

the mapping

Returns:String

the name