Skip to content
Sharp

Spring Core · interview question

Which layer should coordinate inventory checks, payment, and order persistence for a checkout request?

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

Correct answer

D. The service layer

Why

A service is the right place to coordinate a business use case that spans several collaborators. That keeps controllers thin and repositories focused on data access instead of business orchestration.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →