This project implements a RESTful calculator API with operations: sum, subtraction, multiplication, and division. It uses Spring Boot with Kafka for inter-module communication.
- Java 17+ (or compatible with your Spring Boot version)
- Gradle
- Docker & Docker Compose installed
- Linux environment (sudo access required for Docker commands)
Before running the application, navigate to the docker folder and start Kafka and related services:
cd docker
sudo docker compose up -dFrom the root source folder, run:
./gradlew build
./gradlew bootRun
Test the endpoints using a web browser or tools like curl or Postman:
GET http://localhost:8080/sum?a=5&b=3Expected response:
{
"result": "8"
}Application logs are saved at:
/home/avareno/Proj/wit/demo/logs/wit-app.logConfigured with Logback file appender.
Notes
Make sure Docker is running before starting the Spring Boot app.
Kafka must be up for proper inter-module communication.