Skip to content
Sharp

Spring Core · interview question

How should a @Service layer method be structured in a Spring Boot application?

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

Correct answer

A. Handle business logic independently of HTTP and data access

Why

A @Service layer method should focus purely on business logic, without concerns for HTTP or data access. This separation of concerns allows for cleaner, more maintainable code.

Test yourself on Spring Core

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

Start free test
All Spring Core questions →