It is used to decide one controller among many controllers using url path.The spring framework contains the following handler mappings implementations.

Handler Mapping Implementation Description
BeanNameUrlHandlerMapping Maps controllers to URLs that are based on controller’s bean name in
spring configuration file.
ControllerBeanNameUrlHandlerMapping Same as above except the bean names aren’t required to follow URL conventions.
ControllerClassNameHandlerMapping Maps controllers to URLs by using the controller’s class name as the basis for their URLs.
DefaultAnnotationHandlerMapping Maps request to controller and controller methods that are annotated with @RequestMapping
SimpleUrlHandlerMapping Maps controllers to URLs using a property collection defined in the spring application context.

By default,the DispatcherServlet creates and uses BeanNameUrlHandlerMapping and DefaultAnnotationHandlerMapping.However,we can explicitly configure handler mapping as follows.

<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>