@Service, @Controller and @Repository
Fleeting- External reference: https://www.baeldung.com/spring-bean-annotations
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:
@Controller
@Controller is a class level annotation which tells the Spring Framework that this class serves as a controller in Spring MVC:
@Repository
DAO or Repository classes usually represent the database access layer in an application, and should be annotated with @Repository: