This service interacts with postgresDB to perform CRUD ops for order data
Make sure Java 17 and Docker is installed on your machine (https://www.docker.com/products/docker-desktop/)
./gradlew clean build
docker-compose up
docker container ls
docker-compose up postgres
Make appropriate changes to datasource in application.yml file Start the SpringBootApp in IDE using the following env args
-Dspring.datasource.orderecommercedb.url= jdbc:postgresql://localhost:5432/orderecommerce_db?currentSchema=public
-Dspring.datasource.orderecommercedb.name= orderecommerceuser
-Dspring.datasource.orderecommercedb.password= orderecommercepwd
-Dspring.datasource.orderecommercedb.hikari.connectiontimeout=60000
-Dspring.datasource.orderecommercedb.hikari.maximumpoolsize=5
-Dspring.datasource.orderecommercedb.hikari.poolname=orderecommercedb
-Dspring.datasource.orderecommercedb.hikari.autocommit=false
-Dservice.name=orderecommerce
-Dspring_application_context_path=/order-ecommerce
Note:
- All the env args are specified in the docker-env-file
- PostgresSQL startup create script is specified within DockerCompose setup.sql
- Verify running instances from Docker Desktop