Create a simple microservice ecosystem that can behave like a very simple transaction system (with accounts and transfers).
- users can create accounts with simple details (Name; email; opening amount)
- users can get account information.
- users of the api can transfer money.
- optional – authentication.
- optional – persistent storage
- use java 17+
- easy to build (compile)
- timebox to ~ 4hours
- Git commit history
- Git Repo
- Create Initial application
- Create Account Service - Account Entity / Repository / Service / Controller
- Create Transaction Service - Transaction Entity / Repository / Service / Controller
- Create Test Cases
- Create Dockerfile
- Create Docker-compose
- Create Documentation
mvn clean install
cd target
java -jar .\assignment-0.0.1-SNAPSHOT.jar --spring.profiles.active=local
docker-compose up -d
Assignment.postman_collection.json
curl --location 'http://localhost:8080/api/v1/accounts/create' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=24EC3ED0959E457C74140C3F4BDEED06' \
--data-raw '{
"name":"Tinus",
"email":"Tinus2@gmail.com",
"balance":12000
}'
curl --location 'http://localhost:8080/api/v1/accounts/Tinus2@gmail.com' \
--header 'Cookie: JSESSIONID=5E4B63F6A855D06BD7E4F514FA51A34E'
curl --location 'http://localhost:8080/api/v1/transactions/transfer' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=24EC3ED0959E457C74140C3F4BDEED06' \
--data-raw '{
"sourceAccountEmail":"Tinus2@gmail.com",
"targetAccountEmail":"Tinus2@gmail.com",
"amount":13000
}'