Building a monolith

First, we need the entities that will represent the data kept by the application.

Here is the User entity:

@Entitypublic class User implements Serializable {    private static final long serialVersionUID = 1L;    @Id    @GeneratedValue(strategy = GenerationType.AUTO)    private Long id;        @Column    private String name;        @Column    private String email;    public User(){       }    public User(String name, String email) {        this.name = name;        this.email = email;    }    public Long getId() {        return id;    }    public void setId(Long id) {        this.id = id;    }        public String getName() {        return name;    }    public void setName(String name) {        this.name = name;    }    public String getEmail() {        return email;    }    public void setEmail(String email) {        this.email = email;    } }

Here is the ...

Get Java EE 8 Cookbook 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.