beginnerSpring MVC Annotations

What does @PutMapping do, and how does it fit REST semantics?

@PutMapping maps HTTP PUT requests to a handler method, matching REST's convention that PUT should fully replace an existing resource at a known URI in an idempotent way. A typical handler signature is updateUser(@PathVariable Long id, @RequestBody UserDto dto), where the ID identifies which resource to replace and the body supplies its complete new state.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to You have 10 consumers in a group but only 3 Kafka partitions. How many consumers actually process messages?← Back to all Spring Boot & Microservices questions