Our Mail service is abstract and can be used for different purposes, so we will create a simple class to represent a mail message in our system. Our Mail class should look like this:
package springfive.airline.mailservice.domain;import lombok.Data;@Datapublic class Mail { String from; String to; String subject; String message;}
Easy, this class represents an abstract message on our system.