beginnerSpring MVC Annotations

What does the @RequestMapping annotation do in Spring MVC?

@RequestMapping maps an HTTP request to a specific handler method (or an entire controller class), matching on URL path, HTTP method, headers, or parameters. It's the general-purpose mapping annotation that @GetMapping, @PostMapping, @PutMapping, and @DeleteMapping are all built as method-specific shorthand for — e.g. @GetMapping("/users") is equivalent to @RequestMapping(value = "/users", method = RequestMethod.GET).

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What does the @RequestMapping annotation do in Spring MVC?

Next Step

Continue to Kafka consumer lag suddenly spikes in production. What do you check first?← Back to all Spring Boot & Microservices questions