The annotation is used for mapping requests to precise handler lessons or methods.
In spring, all of the incoming web request routing is handled by dispatcher servlet. Whilst it receives the request, it determines which controller is supposed for processing the request via request handlers. The dispatcher servlet scans all of the training annotated with @controller. The procedure of routing requests depends on @requestmapping annotations that are declared inside the controller instructions and their methods.