Creating data repositories

As we have now set up our necessary entities, we must create repositories which we will use to access data pertaining to our entities. Create a repositories package within the com.example.placereviewer package. We have two entities, and as such, we shall create two repositories (one to access data pertaining to each entity). The first of the repositories will be UserRepository and the second will be ReviewRepository. Create a UserRepository interface file within com.example.placereviewer.data.repository with the following content:

package com.example.placereviewer.data.repositoryimport com.example.placereviewer.data.model.Userimport org.springframework.data.repository.CrudRepositoryinterface UserRepository : CrudRepository<User ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.