This is a Product Management application that allows you to manage and monitor product information, including product details, expiration dates, markdown information, and replenishment needs. The application provides a RESTful API to perform various operations on products.
-
Clone the repository to your local machine.
git clone https://github.com/refinedblessing/product-management
-
Configure your database settings in application.properties
-
Build and run the application using Maven:
mvn clean install mvn spring-boot:run
The Product Management Application provides RESTful API endpoints for various product-related operations. Below are the available API endpoints and their descriptions:
- Endpoint: /api/products
- Method: GET
- Description: Retrieve a list of all products.
- Endpoint: /api/products/{id}
- Method: GET
- Description: Retrieve a product by its ID.
- Endpoint: /api/products
- Method: POST
- Description: Add a new product.
- Endpoint: /api/products/{id}
- Method: PUT
- Description: Update an existing product by its ID.
- Endpoint: /api/products/{id}
- Method: DELETE
- Description: Delete a product by its ID.
Create Product: ProductName, optional (ExpiryDate, markdownDate, Quantity, minThreshold, maxThreshold)
- Endpoint: /api/products/create-product
- Method: POST
- Description: Create a new product with optional details.
- Endpoint: /api/products/display-product
- Method: GET
- Description: Display a product by name or ID, or retrieve all products.
- Endpoint: /api/products/display-product-to-refill
- Method: GET
- Description: Display products that need replenishment.
- Endpoint: /api/products/display-product-count
- Method: GET
- Description: Display the count of products.
- Endpoint: /api/products/display-products-expiry-date
- Method: GET
- Description: Display product expiry dates.
- Endpoint: /api/products/display-expired-products
- Method: GET
- Description: Display expired products.
- Endpoint: /api/products/display-products-in-markdown
- Method: GET
- Description: Display products currently in markdown.
- Endpoint: /api/products/display-products-for-markdown
- Method: GET
- Description: Display products that need markdown.