Konubinix' opinionated web of thoughts

@Service, @Controller and @Repository

Fleeting

Those are @Component, and the annotation is only some sugar to make clearer for the reader the purpose of the annotated class.

@Service

The business logic of an application usually resides within the service layer – so we’ll use the @Service annotation to indicate that a class belongs to that layer:

https://www.baeldung.com/spring-bean-annotations

@Controller

@Controller is a class level annotation which tells the Spring Framework that this class serves as a controller in Spring MVC:

https://www.baeldung.com/spring-bean-annotations

@Repository

DAO or Repository classes usually represent the database access layer in an application, and should be annotated with @Repository:

https://www.baeldung.com/spring-bean-annotations

Notes linking here