+1 vote
asked in JAVA by

   Any one give clear explain about @requestCOntroller and dispatchServlet

1 Answer

0 votes
answered by (8.2k points)

Request Controller and DispatchServlet

Dispatcher Servlet is used to handle all incoming requests and route them through Spring. When DispatcherServlet receives a web request, it determines which controllers should handle the incoming request.

It first scans for all classes that are declared with the @Controller annotation. The dispatching process depends on the various 

@RequestMapping annotations declared in a controller class and its handler methods. There are three levels of request mapping can be defined in Spring controller.