Creating a user repository

We will communicate with the database in this repository class. This is a Repository class, and so we annotate it with @Repository. Let's create a Repository class named UserRepository.kt, which extends the JpaRepository.  By extending JpaRepository, this interface will get a set of generic CRUD functions to create, update, delete, and fetch the data. 

Here is the code of the Repository class:

@Repository
interface UserRepository: JpaRepository<UserModel, Long>

Here are some functions we will get from this JPARepository: