Bird
0
0

Which HTTP method does @GetMapping handle by default in Spring Boot?

easy📝 Conceptual Q2 of 15
Spring Boot - REST Controllers
Which HTTP method does @GetMapping handle by default in Spring Boot?
ADELETE
BPOST
CPUT
DGET
Step-by-Step Solution
Solution:
  1. Step 1: Recall HTTP methods

    HTTP defines several methods like GET, POST, PUT, DELETE for different actions.
  2. Step 2: Match @GetMapping to HTTP method

    @GetMapping is specifically designed to handle GET requests, which retrieve data.
  3. Final Answer:

    GET -> Option D
  4. Quick Check:

    @GetMapping = GET method [OK]
Quick Trick: @GetMapping always maps GET requests [OK]
Common Mistakes:
  • Mixing GET with POST
  • Assuming @GetMapping handles all HTTP methods
  • Confusing with @RequestMapping without method

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes