This app has 4 endpoints:
GET /user/<nick>
- get user information by nickGET /user/<nick>/withdraw?sum=<sum>
- withdraw any sum of moneyGET /user/<nick>/contribute?sum=<sum>
- contribute any sum of moneyGET/user/<nick>/transfer?sum=<sum>&to=<nick>
- transfer money between users
It is also assumed that:
- there is no currencies, exchange rates, transactions, only abstract sums of money
- each user is an account itself
Building jar with all dependecies:
./gradlew jar
Standalone executable jar can be found at build/libs/money-transfer-api.jar. So you can run this jar:
java -jar build/libs/money-transfer-api.jar
The app will be listening on port 8080.