

Model - contains the data models (and entities) You will understand it when we implement Cart DTO in this tutorial. Don’t worry if you could not understand DTOs. While retrieving that information from the database, it can use DTOs to filter this information and then send it to the client. So, the server stores its information in a database-friendly way. There are some details in the database that we do not want to send as a response to the API calls. In client-server projects, data is often structured differently.

We will now describe the following directories:-Ĭontroller - contains the controllers for various API endpointsĭto - contains the Data Transfer Objects (DTO) for our back-end.


This will help you in understanding the code in a better way. As we will use the project structure that we created in the previous tutorials, we intend to describe the structure here before we begin working on the Wishlist feature. If you have not read the previous tutorials in the back-end series, don’t worry. So, if you have any doubt regarding anything that we developed earlier, you can read about it in the corresponding tutorial in the series. We will extend the code which we developed in the previous tutorials in this series. This tutorial is part of our series on Back-end Development with Java. IntelliJ IDEA Ultimate - open-source (Recommended) Knowledge of Java, OOP & Spring Boot Framework You can find the complete code at Github. You will find the cart API in cart-controllersection(Run the code in your local first) You can test the API at the following swagger link. After the API has been created, we will use that API in our Vue.Js front-end(in future tutorials). We will first develop the back-end API using Java & Spring Boot (in this tutorial). It should also be able to show the total cost of items in the cart. Every e-Commerce site has a Shopping Cartfeature, today we will learn how to make the backend APIs using Java and Spring BootĬart is a must-have feature for an e-commerce app that allows the users to save the items they want to buy, change the quantity, and remove them.
