CQRS implementation for product domain. The project consists of two microservices
i. product-command-service
ii. product-query-service
- SpringBoot 3.3.2
- SpringData JPA
- Postgres
- Docker
- product-command-service:
9090 - product-query-service:
9091 - product-command-db:
5433 - product-query-db:
5432 - kafka:
29092
Make sure you have Docker and Docker Compose installed on your machine.
- Docker
- Docker Compose
Check docker is installed
docker --versionClone the repository:
git clone https://github.com/aatifansari/E-commerce-CQRS-Implementation
cd E-commerce CQRS ImplementationTo start the application, run:
docker-compose up -dThis command will build the necessary Docker images (if they don't exist) and start the containers in detached mode.
To stop the application and remove the containers, run:
docker-compose down-
Add product
curl --location 'http://localhost:9090/products/save' \ --header 'Content-Type: application/json' \ --data '{ "name" : "Fridge", "description" : "LG", "price" : 99999.99 }'
-
Get All Product
curl --location 'http://localhost:9091/products'
