Spring Boot application that interacts with a MySQL database to provide a RESTful API for filtering and sorting product records.
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.
Clone the repository:
git clone https://github.com/Chetan0777/Loqo_Product_Management_System.git
Build the project:
mvn clean install
application.properties
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
Set Properties:
Change database name and username & password
Run the application:
mvn spring-boot:run
The application will start on port 8080. You can access the API at http://localhost:8888/products
.
Add products in database.
http://localhost:8080/addProduct
POST
Retrieve the list of products with optional filtering and sorting.
http://localhost:8080/products
GET
The application includes unit and integration tests to ensure the functionality of the service and controller layers.