Time for action – creating a domain object

So far, in your webstore, you have showed only a welcome message. It is now time for you to show your first product on the web page. Do this by creating a domain object, as follows, to represent the product information:

  1. Create a class called Product under the com.packt.webstore.domain package in the source folder src/main/java. Now, add the following code into it:
    package com.packt.webstore.domain; import java.math.BigDecimal; public class Product { private String productId; private String name; private BigDecimal unitPrice; private String description; private String manufacturer; private String category; private long unitsInStock; private long unitsInOrder; private boolean discontinued; private String ...

Get Spring MVC Beginner’s Guide 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.