Welcome to our E-Commerce App! This application is built using Spring Boot and Java, serving as the backend for our online store. This README file provides an overview of the application, its features, Prerequisites, Demo, Resourses and Technologies.
- Product Listing: View available products with details.
- Order Viewing: View previous orders and order details.
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) installed.
- Maven installed.
- Your favorite IDE (e.g., IntelliJ, Eclipse) for code editing.
Step 1: Create a Spring Boot Project by use Spring Initializr to generate a basic Spring Boot project. Visitstart.spring.io and configure your project with the following settings:
- Project: Maven Project
- Language: Java
- Spring Boot: Latest stable version
- Packaging: Jar
- Dependencies: Spring Web , Spring Data JPA , devtools , thymeleaf , data-jpa , security , mysql-connector-j and plugin. Click on "Generate" to download the project zip file.
Step 2: Extract the downloaded zip file and import the project into your preferred IDE (IntelliJ IDEA, Eclipse, etc.).
Step 3: Define and create a simple entity class representing the object you want to manage. For example, if you are building a E-commerce application for , create a products and product-category classes , and this varies according to your project and its dependence on the entites and relationships in the data base .
Step 4: Create Repository interface for your entity to perform CRUD operations.
Step 5: Create a Controller to handle HTTP requests and interact with the repository.
This E-Commerce application operates in a read-only mode. It does not support PUT, POST, or DELETE operations. It is designed solely for viewing products, orders, and inventory. Thank you for your understanding. 🛍️
To test the API endpoints using Postman, follow these steps:
- Import Postman Collection:
- Import the provided Postman collection file
ecommerce_app.postman_collection.json
.
- Set Environment Variables:
- Create a new environment in Postman.
- Set the
base_url
variable tohttp://localhost:8080
.
- Test Endpoints:
- Use the imported collection to test various endpoints like retrieving products, viewing orders, etc.
- IntelliJ IDEA Community Edition 2023.1.3
- mysQL Workbench 8.0 CE
- postman