This is a Java REST service powered by rabbitmq that performs these calculations:
- Addition
- Subtraction
- Multiplication
- Division
mvn test
Ensure you have docker and maven installed locally
docker-compose up -d
mvn -T 2 -pl rest,calculator clean spring-boot:run
GET localhost:8080/sum?a=123&b=27.32
{
"result": 150.32
}
GET localhost:8080/subtract?a=123&b=27.32
{
"result": 95.68
}
GET localhost:8080/multiply?a=123&b=27.32
{
"result": 3360.36
}
GET localhost:8080/divide?a=123&b=27.32
{
"result": 4.5021961932
}