RESTful API allowing to create banking account, transfer money and get information about transaction and accounts.
- SpringBoot
- H2
- Liquibase
- Junit 5
- Mockito
- Lombok
- Swagger
- Mapstruct
- Jackson
- clone this repo
- run application
- POST http://localhost:8080/api/accounts - to create an account.
Request body example:
{ "beneficiaryName": "Sam", "pin": "3333" } - POST http://localhost:8080/api/accounts/{accountNumber}/deposit - to deposit money.
Request body example:
{ "sum": 1000, "pin": "3333" } - POST http://localhost:8080/api/accounts/{accountNumber}/withdraw - to withdraw money.
Request body example:
{ "sum": 400, "pin": "3333" } - POST http://localhost:8080/api/accounts/{accountNumber}/transfer - to transfer money.
Request body example:
{ "sum": 2000, "receiver": "35d0bd77-50f8-4017-a465-f761270d8e18", "pin": "3333" } - GET http://localhost:8080/api/accounts - to get information about all accounts
- GET http://localhost:8080/api/accounts/{accountNumber}/transactions - to get information about all transactions of specified account
- http://localhost:8080/h2-console/ - DB
- login - admin
- password - admin
- JDBC URL - jdbc:h2:mem:bank-service-db
- http://localhost:8080/swagger-ui/index.html Swagger documentation