Creating a Repository
Learn how to create a repository — a class that manages entities.
We'll cover the following...
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.
@Repositorypublic class PlayerRepository {}
Creating the PlayerRepository class
Enabling transaction management
Database queries contain multiple steps. We will also enable transaction management to allow ...
Access this course and 1400+ top-rated courses and projects.