June 2014
Beginner to intermediate
304 pages
7h 25m
English
We are going to add a shopping cart facility in two phases. Firstly, we will create a REST-style controller to handle all shopping-cart-related web requests. Secondly, we will add some JavaScript code to render the JSON data returned by the REST web service controller. First, let's implement some RESTful web services using Spring MVC controllers so that later we can add some JavaScript code to consume those web services.
CartItem under the package com.packt.webstore.domain in the source folder src/main/java; then, add the following code to it:package com.packt.webstore.domain; import java.math.BigDecimal; public class CartItem { private Product product; private int ...