Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chetan0777/loqo_product_management_system
Spring Boot application that interacts with a MySQL database to provide a RESTful API for filtering and sorting product records.
https://github.com/chetan0777/loqo_product_management_system
hibernate java-8 junit5 mokito mysql spring-boot spring-data-jpa spring-mvc
Last synced: about 1 month ago
JSON representation
Spring Boot application that interacts with a MySQL database to provide a RESTful API for filtering and sorting product records.
- Host: GitHub
- URL: https://github.com/chetan0777/loqo_product_management_system
- Owner: Chetan0777
- Created: 2024-07-20T05:10:00.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-20T08:32:22.000Z (4 months ago)
- Last Synced: 2024-10-12T02:03:33.869Z (about 1 month ago)
- Topics: hibernate, java-8, junit5, mokito, mysql, spring-boot, spring-data-jpa, spring-mvc
- Language: Java
- Homepage: https://github.com/Chetan0777/Loqo_Product_Management_System
- Size: 366 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Loqo.Ai_Product_Management_System
This is a Spring Boot application that interacts with a MySQL database to provide a RESTful API for filtering and sorting product records. The API allows you to fetch product details from the products table with various filtering and sorting options.
## Table of Contents
- [Getting Started](#getting-started)
- [Technologies](#technologies)
- [Running the Application](#running-the-application)
- [API Endpoints](#api-endpoints)
- [Testing](#testing)## Getting Started
### Prerequisites
- Java 8 or higher
- Maven
- MySQL### Installation
1. Clone the repository:
```bash
git clone https://github.com/Chetan0777/Loqo_Product_Management_System.git
```2. Build the project:
```bash
mvn clean install
```
3. application.properties
```bash
spring.application.name=LOQO AI
spring.datasource.url=jdbc:mysql://localhost:3306/loqoai
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=root123
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true```
4. Set Properties:
```bashChange database name and username & password
```### Technologies
- Java
- Spring Boot
- Spring Data JPA
- Hibernate
- Lombok
- JUnit 5
## Running the Application1. Run the application:
```bash
mvn spring-boot:run
```2. The application will start on port 8080. You can access the API at `http://localhost:8888/products`.
## API Endpoints
## Add Product
Add products in database.
- **URL:** `http://localhost:8080/addProduct`
- **Method:** `POST`
#### Screenshot of Add Product API![Product API](images/addProduct.png)
### Get Products
Retrieve the list of products with optional filtering and sorting.
- **URL:** `http://localhost:8080/products`
- **Method:** `GET`#### Screenshot of Get Products API
![Product API](images/getProducts.png)
## Testing
The application includes unit and integration tests to ensure the functionality of the service and controller layers.
### Test Coverage
- ProductServiceTest: Unit tests for the ProductService class.
- ProductControllerTest: Integration tests for the ProductController class.