This project is a backend implementation of an e-commerce web application built using the Java Spring Boot framework. The application allows users to retrieve product information from a database and enables sellers to update product details.
├── SpringEcom # Main project directory
│ ├── controller # Contains the controllers for handling HTTP requests
│ │ └── ProductController.java # Handles product-related requests
│ ├── model # Contains the data model classes
│ │ └── Product.java # Product entity class
│ ├── repo # Repository layer for database interactions
│ │ └── ProductRepo.java # Repository interface for product data
│ ├── service # Contains the service layer business logic
│ │ └── ProductService.java # Service class for product operations
│ └── SpringEcomApplication.java # Main entry point of the application
├── README.md # Project documentation
Install PostgreSQL and create a new database for the project.
Update the application.properties
file to configure the database connection.
spring.datasource.url=jdbc:postgresql://localhost:5432/<your-database-name>
spring.datasource.username=<your-username>
spring.datasource.password=<your-password>
spring.jpa.hibernate.ddl-auto=update
Clone the repository to your local machine:
git clone <repository-url>
cd E-commerce-web-Application-main
Build the project using Maven:
mvn clean install
Run the Spring Boot application:
mvn spring-boot:run
The application should now be running at http://localhost:8080
.
The application exposes the following REST API endpoints:
This project uses Lombok annotations to reduce boilerplate code. Make sure to install Lombok in your IDE:
Preferences > Build, Execution, Deployment > Compiler > Annotation Processors
.To run the unit tests, use the following command:
mvn test
Feel free to contribute to this project by submitting issues or pull requests.
This project is licensed under the MIT License.
License This project is licensed under the MIT License. See the LICENSE file for details.
Contact If you have any questions or would like to reach out, feel free to email me at bheemhepte@gmail.com or connect with me on LinkedIn.