A robust and secure Banking System built using Core Java, Spring Boot, MySQL, and Spring Data JPA. This project provides RESTful APIs for handling user authentication, account management, fund transfers, transaction history, and real-time balance checks. It also supports role-based access and automated notifications.
โ
Secure User Registration & Login (JWT-based)
โ
Account Creation & Management
โ
Fund Transfer between Accounts
โ
View Transaction History
โ
Real-Time Balance Check
โ
Role-Based Access Control (Admin / User)
โ
RESTful API Architecture
โ
Input Validation & Error Handling
โ
Automated Email or Console Notifications
โ
MySQL Integration with JPA/Hibernate
- Java (Core Java, Java 17 or above)
- Spring Boot
- Spring Data JPA
- MySQL
- Hibernate
- JWT for Authentication
- Lombok
- Maven
- Postman for API Testing
src
โโโ main
โโโ java
โ โโโ com.bankingsystem
โ โโโ controller
โ โโโ service
โ โโโ repository
โ โโโ model
โ โโโ config
โโโ resources
โโโ application.properties
โโโ data.sql
- Java 17+
- Maven
- MySQL Server
-
Clone the Repository
git clone https://github.com/your-username/Banking-System.git cd Banking-System -
Set up MySQL Database
CREATE DATABASE banking_system;
-
Configure
application.propertiesspring.datasource.url=jdbc:mysql://localhost:3306/banking_system spring.datasource.username=root spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true
-
Build and Run
mvn spring-boot:run
-
Test with Postman
- Base URL:
http://localhost:8080/api
- Base URL:
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register | Register new user |
| POST | /auth/login | Login and get JWT token |
| GET | /accounts/{id} | Get account details |
| POST | /accounts/transfer | Transfer funds |
| GET | /transactions/{userId} | Transaction history |
| GET | /accounts/balance/{id} | Real-time balance check |
| Role | Access Permissions |
|---|---|
| Admin | View all users, transactions, delete users |
| User | Manage own account, transfer, view history |
- Use JUnit and Mockito for service/controller layer testing.
- Coverage for login, transfer, and exception handling.
- Spring Boot Documentation
- MySQL Community
- Baeldung & StackOverflow
Akhilesh Ojha
๐ง akhil00664@gmail.com
๐ LinkedIn
This project is licensed under the MIT License - see the LICENSE file for details.