A simple and clean Banking REST API built using Spring Boot, Spring Data JPA, and MySQL.
It demonstrates CRUD operations for managing bank accounts with a layered architecture (Controller → Service → Repository → Entity → DTO → Mapper).
✅ Create a new bank account
✅ Fetch account details by ID
✅ Update account balance
✅ Delete an account
✅ Clean architecture with DTO and Mapper
✅ Uses Lombok for boilerplate reduction
✅ MySQL integration with JPA (Hibernate ORM)
| Layer | Technology |
|---|---|
| Language | Java 17 |
| Framework | Spring Boot 3.x |
| ORM | Spring Data JPA (Hibernate) |
| Database | MySQL |
| Dependency Manager | Maven |
| Build Tool | Spring Boot Maven Plugin |
| Additional | Lombok, REST APIs |
com.proj.Banking_app ├── controller │ └── AccountController.java ├── service │ ├── AccountService.java │ └── implementation │ └── AccountServiceImp.java ├── repository │ └── AccountRepository.java ├── entity │ └── Account.java ├── dto │ └── AccountDto.java ├── mapper │ └── AccountMapper.java └── BankingAppApplication.java
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/accounts |
Create a new account |
GET |
/api/accounts/{id} |
Retrieve account by ID |
PUT |
/api/accounts/{id} |
Update account balance/details |
DELETE |
/api/accounts/{id} |
Delete an account |
POST http://localhost:8080/api/accounts
Body:
{
"accountHolderName": "John Doe",
"balance": 5000.00
}
**Response:**
{
"id": 1,
"accountHolderName": "John Doe",
"balance": 5000.0
}
💬 **Author**
👤 Siddhu Tirse
💼 Java & Spring Boot Developer
🌐 www.linkedin.com/in/siddheshtirse