This section will introduce JPA and how to use Spring Data JPA repositories to provide Create, Retrieve, Update, and Delete (CRUD) operations on JPA easily.
Using Spring Data JPA for persistence
Class diagram for the domain model
Since the domain model is the most important component of an application, this section will go over designing it before we go any further. The following is the simple class diagram for this web service:
There is only one main domain model, as shown in the preceding diagram. This is explained as follows:
User: This is the main domain model, which will store user details such as username, password, email, and id.