@Component,@Service,@Repository and @Controller differenrence Spring @Component, @Service, @Repository and @Controller annotations are used for automatic bean detection using classpath scan in Spring framework. @Component is a generic annotation. Difference of @Service, @Repository, @Controller with @Component is they are special cases of @Component and used for particular purposes. The difference is just classification only. For all these annotations (stereotypes), technically the core purpose is same. Spring automatically scans and identifies all these classes that are annotated with “ @Component, @Service, @Repository, @Controller ” and registers BeanDefinition with ApplicationContext. Difference Between @Component, @Service, @Repository and @Controller Major difference between these stereotypes is they are used for different classification. In a multitier application, we will have different layers like presentation, service, business, data access etc. Whe...