/bank-service

Bank Service Api Demo

Primary LanguageJava

Bank Service Api Demo

Note: Java 8 or higher is required

Build

mvn clean package

Run

java -jar target/bank-service.jar

# or use another port
java -Dserver.port=8585 -jar target/bank-service.jar

Sample

#!/bin/bash

echo Accounts before
curl -s http://localhost:8080/api/account/list
echo

echo Add account
curl -d '{"name":"Peter Phil", "amount":"12.45"}' -H "Content-Type: application/json" -X POST http://localhost:8080/api/account/create
echo

echo Add another account
curl -d '{"name":"Walt Disney", "amount":"42.24"}' -H "Content-Type: application/json" -X POST http://localhost:8080/api/account/create
echo

echo Accounts after adding
curl -s http://localhost:8080/api/account/list
echo

Endpoints