Creating a Repository

Learn how to create a repository — a class that manages entities.

In JPA terms, a repository is a class that manages the entities.

@Repository annotation

We will create a PlayerRepository class to manage the Player entity and to store and retrieve data. We can mark this class with the @Repository annotation.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.