This is a demo microservice for the consumers-producers currently accessing atomic counter.
- Java 8
- Spring Boot 2.4.2
- Spring REST API (Spring Web)
- Lombok 1.18.16
- Spring Data JPA & MySQL-8
- Dockerized (docker-compose.yml and Dockerfile is included)
- TDD approach using JUnit 5, Mockito, and Spring Boot Test
- Spring boot starter validation for request validation
cd <project_directory>
mvnw clean package
docker-compose up --build
Note: Above docker compose command will run the containers namely,
ekar-mysql
container for mysql and its port is3306
ekar-producer-consumer-service
container for microservice and its port is8080
http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
Note: Also Postman Collection has been pushed into the repository for your reference.
Docker has to be there on the host machine
docker exec -it ekar-mysql /bin/bash
mysql -usa -ppassword -h localhost -P3306
show databases;
use ekardb;
show tables;
select * from request_log; select * from counter_log;
Note: Preserve this state until you complete your testing.
exit
exit