Java 11
In-memory H2 Database
Docker
Build the Jar file
mvn clean package
Build the image :
docker build -t cashwithdrawal:latest .
Start the Docker Container in detach mode
docker run -d -p 8181:8181 -t cashwithdrawal:latest
mvn spring-boot:run
java -jar application/spring-app/build/libs/spring-app-1.0.0.jar
Username : moses
password : password1@
and
username: john
password: password1@
POST: http://localhost:8181/accounts
Body:
{
"surname": "surname",
"firstname": "moses",
"routingNumber": "028444018",
"nin": "dfre345",
"accountNumber": "0245253419",
"currency": "USD",
"bankName": "West Bank",
"balance": 5000
}
GET: http://localhost:8181/accounts
POST: http://localhost:8181/accounts/payment
Body:
{
"source": {
"type": "COMPANY",
"sourceInformation": {
"name": "ONTOP INC"
},
"account": {
"accountNumber": "0245253419",
"currency": "USD",
"routingNumber": "028444018"
}
},
"destination": {
"name": "TONY STARK",
"account": {
"accountNumber": "1885226711",
"currency": "USD",
"routingNumber": "211927207"
}
},
"amount": 300
}
GET: http://localhost:8181/transaction/search
GET: http://localhost:8181/transaction/search?amount=470