This project demonstrates the use of caching with REdis to speed the request response
docker run -d -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=product-inventory --name mysqldb -p 3307:3306 mysql:8.0
To stop the docker container, run the command docker stop mysqldb && docker container prune -f
mvn install
mvn spring-boot:run
The application starts on the port 8030
Endpoint | Method | Parameters |
---|---|---|
/categories | GET | Retrieve all categories |
/products | GET | Retrieve all products |
/products/search | GET | Search products by name, category, price and availability |
/products | POST | Add a new product |
I prepared a Postman collection with all the requests above. You can download, import and test the application without hassle Check out the collection