A Bank account transactions microservice with Spring Boot, Postgres as Database, and RabbitMQ for async communication.
This microservice is responsible for creating user account and balances for provided currencies that are defined
as an enum
:
public enum Currency {
EUR, SEK, GBP, USD
}
Users can deposit and withdraw money from accounts by providing a Direction:
public enum Direction {
IN, OUT
}
Project uses Spring AOP to log the result of every transaction which improves the efficiency of main business logic by keeping it clean.
All transactions will be executed with proper isolation level.
You need to have docker installed on your machine. you can easily deploy the service with executing the following command in your bash terminal:
docker compose up
It will create and start database and message broker services first and then it will create a container form the bank account microservice docker image and will bind port 8080 of the container for public use.
Hit port 8080 for good reasons.
Go to OpenAPI documents page and hit the endpoints.
The Main business logic is covered with testing to a good extent, but there are also rooms for improvement.
./gradlew test
- add benchmark
- add integration test for transactions
- add java docs
- add build status and test coverage to pull requests
- add project status to readme