A comprehensive banking system built with Spring Boot that provides REST API endpoints for account management and money transfers.
Spring Bank is a modern banking application that demonstrates enterprise-level Java development practices using the Spring ecosystem. The system manages customer accounts and facilitates secure money transfers between accounts with full transaction support.
The application follows a layered architecture pattern with clear separation of concerns:
Controller Layer: REST endpoints for handling HTTP requests and responses Service Layer: Business logic implementation with transaction management Repository Layer: Data access layer with custom queries Model Layer: Entity definitions and data structures
The system provides comprehensive banking functionality including account management, money transfers with transaction safety, account lookup by customer name, and exception handling for invalid operations. All operations are secured with Spring's transaction management to ensure data consistency.
Framework: Spring Boot 4.0 Data Access: Spring Data JDBC Web Layer: Spring Web MVC Database: H2 Database (embedded) Build Tool: Maven Java Version: 25
The application uses a simple yet effective database schema with an account table containing customer information and account balances. The database is automatically initialized with 500 sample accounts for testing and demonstration purposes.
POST /transfer: Execute money transfers between accounts GET /accounts: Retrieve all accounts or filter by customer name
Clone the repository and navigate to the project directory. Run the application using Maven with mvn spring-boot:run. The application will start on the default port and initialize the H2 database with sample data.
The application includes comprehensive test coverage and can be tested using the H2 console for database inspection or REST clients for API testing.
The codebase is organized following Spring Boot conventions with separate packages for controllers, services, repositories, models, and exception handling. Configuration files and database scripts are located in the resources directory.