Skip to content
Sharp

Spring Core · interview question

Why does a @RestController in a Spring Boot application matter in this design?

Multiple choiceEasychapter-9-curatedpremiumspring-corecontrollers-services-repositories
Choose one answer
Answer and explanation

Correct answer

D. Handle HTTP requests and return responses.

Why

A @RestController in Spring Boot is designed to handle incoming HTTP requests and return appropriate responses, typically in JSON or XML format. It should not contain business or data access logic.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →