O'Reilly logo

Docker and Kubernetes for Java Developers by Jaroslaw Krochmalski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Domain model and a repository

A domain model in our service will be a Book class, defined in the Book.java file:

package pl.finsys.example.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Entity public class Book { @Id @NotNull @Column(name = "id", nullable = false, updatable = false) private Long id; @NotNull @Size(max = 64) @Column(name = "author", nullable = false) private String author; @NotNull @Size(max = 64) @Column(name = "title", nullable = false) private String title; public Book() { } public Book(final Long id, final String author, final String title) { this.id = id; this.title = title; this.author ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required