Spring provides some stereotype annotations, among them, @Service and @Repository are special cases of @Component for specific purposes. By annotating component classes with @Service, @Repository, your classes are more clear, thus, Spring will automatically scan and import those beans into the container, so we don’t need to define them using XML.
This tutorial show you overview of Repository Pattern & a Service Layer, as well as difference between @Service & @Repository.
Continue reading “Spring Stereotype Annotations – Difference between @Service and @Repository”