Spring Web Annotation

Annotation is introduced since java 5. It is a new kind of instruction, syntax or meta data that provides data about the program and it is not a part of your program.
Spring framework also provides a wide range of annotation, some of them which is
commonly is used in Spring MVC is explained below.

@Controller - In Spring MVC you can make controller class very easily
by prefixing @Controller before any class declaration.

@Controller
public class MyController {
}

@RequestMapping -The @RequestMapping annotation can be used with the
classes or methods or both. It is used to specify the handler classes or methods
that handles the particular request.