March 2018
Intermediate to advanced
380 pages
9h 23m
English
In the src/main/java/com/mycompany/store/domain folder, you will find the entity domain object. Open Product.java:
@ApiModel(description = "Product sold by the Online store")@Entity@Table(name = "product")@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)public class Product implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotNull @Column(name = "name", nullable = false) private String name; @Column(name = "description") private String description; @Lob @Column(name = "image") private byte[] image; @Column(name = "image_content_type") private String imageContentType; @NotNull @DecimalMin(value = "0")