We need a domain model object to map the records inserted into our database. To do this, we will use the JPA specification; so, we will create an entity class for this purpose, as follows:
- Let's create a new Java package named model, in order to store the data model class. The fully qualified package name will be com.packtpub.thorntail.footballplayermicroservice.model.
- Next, we will build the domain class, named FootballPlayer:
package com.packtpub.thorntail.footballplayermicroservice.model; import java.math.BigInteger; ... /** * Domain model class that maps the data stored into football_player table * inside database. * * @author Mauro Vocale * @version 1.0.0 15/08/2018 */ @Entity @Table(name = "football_player") @XmlRootElement ...