User

It represents a user in our domain model. We have two different profiles, the author who acts as a news writer, and another one is a reviewer who must review the news registered at the portal. Take a look at the following example:

package springfive.cms.domain.models;import lombok.Data;@Datapublic class User {  String id;  String identity;  String name;  Role role;}

Get Spring 5.0 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.