
Modern API Development with Spring and Spring Boot
By :

Repository components are Java classes marked with the @Repository
annotation. This is a special Spring component that is used for interacting with databases.
@Repository
is a general-purpose stereotype that represents both DDD's Repository and the Java Enterprise Edition (EE) pattern, the Data Access Object (DAO). Developers and teams should handle Repository objects based on the underlying approach. In DDD, a Repository is a central object that carries references to all the objects and should return the reference of a requested object. We need to have all the required dependencies and configurations in place before we start writing classes marked with @Repository
.
We'll use the following libraries as database dependencies: