🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Spring Boot Interview Questions: all 10 questions

Quiz: Spring Boot Interview Questions · Question 2 of 10

Which is a correct description of @RestController?

Which is a correct description of @RestController?

  1. A.It is the same as @Service
  2. B.@Controller + @ResponseBody, so return values are written as JSON
  3. C.It creates a database repository
  4. D.It only handles GET requests
Answer & explanation

Correct answer: @Controller + @ResponseBody, so return values are written as JSON

Every handler method's result becomes the response body.

Can you get the rest right without peeking?

Take the timed Quiz: Spring Boot Interview Questions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →