beginnerDependency Injection & Core

What is the difference between @Component, @Service, @Repository, and @Controller?

Tests whether you know these are semantically distinct despite all being stereotypes of @Component under the hood.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What is the difference between @Component, @Service, @Repository, and @Controller?

Next Step

Continue to Spring MVC vs WebFlux vs Java Virtual Threads — when would you choose each?← Back to all Spring Boot & Microservices questions