CRUD operations

To be able to perform CRUD operations with our data, we have to implement some code. We will make the necessary changes and introduce some new classes. What we will present to you now is a standard for every Spring application that manipulates the data stored in the relational database.

Create a package named repository with the NoteRepository interfaces as follows:

package com.journaler.api.repository import com.journaler.api.data.Note import org.springframework.data.repository.CrudRepository /** * String is the type for ID we use. */ interface NoteRepository : CrudRepository<Note, String> TodoRepository: package com.journaler.api.repository import com.journaler.api.data.Todo import org.springframework.data.repository.CrudRepository ...

Get Building Applications with Spring 5 and Kotlin 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.