Bank Management App Documentation

View on GitHub

Project Overview

The Bank Management Application allows users to perform various banking operations such as creating accounts, viewing account details, depositing money, withdrawing money, and closing accounts. The application is built using Spring Boot and connects to a MySQL database.

Project Structure

Entity: Account - Represents the account entity with fields for account number, account holder name, and account balance.

Repository: AccountRepository - Extends JpaRepository to provide CRUD operations for the Account entity.

Service: AccountService and ServiceImplementation - Contains the business logic for managing accounts.

Controller: AccountController - Handles HTTP requests and maps them to the appropriate service methods.

Endpoints

POST /Account/create

Body (JSON):

{
  "account_holder_name": "John Doe",
  "account_balance": 1000.00
}

GET /Account/{accountNumber}

Example:

GET /Account/1

GET /Account/allAccountsDetails
POST /Account/deposit/{accountNumber}/{depositedMoney}

Example:

POST /Account/deposit/1/500.00

POST /Account/withdraw/{accountNumber}/{withdrawMoney}

Example:

POST /Account/withdraw/1/200.00

POST /Account/close/{accountNumber}

Example:

POST /Account/close/1

Postman Requests

Below are the Postman requests to test the endpoints:

Create Account

POST http://localhost:9976/Account/create
Content-Type: application/json

{
  "account_holder_name": "John Doe",
  "account_balance": 1000.00
}

Get Account Details

GET http://localhost:9976/Account/1

Get All Account Details

GET http://localhost:9976/Account/allAccountsDetails

Deposit Money

POST http://localhost:9976/Account/deposit/1/500.00

Withdraw Money

POST http://localhost:9976/Account/withdraw/1/200.00

Close Account

POST http://localhost:9976/Account/close/1