This application was generated using JHipster 4.0.6, you can find documentation and help at https://jhipster.github.io/documentation-archive/v4.0.6.
Pessimistic Lock is taken over PULL(Withdrawal) and PUSH(Deposit) transactions.i.e. no two transactions can update account balance simultaneously.Pessimistic lock can handle traffic of 50 TPS.
DUMBANK.postman_collection.json file can be imported on Postman App which have all rest endpoints listed in it.
DUMBANK.sql dump can be imported in Mysql db.
Please insert required data if Mysql dump is not imported.
INSERT INTO bank
.transaction_type
(transaction_type_id
, remarks
, transaction_type_name
) VALUES ('1', 'credit', 'push');
INSERT INTO bank
.transaction_type
(transaction_type_id
, remarks
, transaction_type_name
) VALUES ('2', 'debit', 'pull');
mvn clean install
mvn spring-boot:run
curl -X POST http://localhost:8080/create/users -H 'content-type: application/json' -d '{"firstName":"Raj", "lastName":"kumar","email":"pawan5@gmail.com"}'
curl -X POST http://localhost:8080/transaction/pull -H 'content-type: application/json' -d '{"accountNumber":"1014975498359882","amount":100.00}'
curl -X POST http://localhost:8080/transaction/push -H 'content-type: application/json' -d '{"accountNumber":"1014975498359882", "amount":100.00}'
curl -X GET http://localhost:8080/accountDetails/1014975498359882
curl -X GET http://localhost:8080/transaction/all/1014975498359882