@controller
@controller
• It is stereotype annotation that indicates that a class serves the role of controller
• Syntax :-
@Controller
class MyController
{
• It indicates that the annotated class is responsible for handling the HTTP requests
• This annotation is used when we are developing web applications using MVC design
pattern
Handler Methods :-
• These methods are also known as URL Handler Methods
• These methods are responsible for processing the incoming requests, performing
business logic and preparing model(data) to be rendered by view page
• In order to map the incoming requests(URL), handler methods can be annotated with
HTTP methods related annotations i.e. @RequestMapping, @PostMapping,
@GetMapping etc