A Spring Boot REST API for managing bank accounts with deposit and withdrawal operations.
- Create and manage bank accounts
- Deposit and withdraw funds
- View account balances
- Input validation and error handling
- H2 in-memory database
- Comprehensive test coverage
- Java 17
- Spring Boot 3.2.0
- Spring Data JPA
- H2 Database
- Maven
- Docker
GET /api/accounts- Get all accountsGET /api/accounts/{id}- Get account by IDPOST /api/accounts- Create new accountPOST /api/accounts/{id}/deposit- Deposit fundsPOST /api/accounts/{id}/withdraw- Withdraw fundsDELETE /api/accounts/{id}- Delete account
# Build and run with Maven
mvn spring-boot:run
# Or build and run with Docker
docker build -t banking-app .
docker run -p 8080:8080 banking-appmvn testThis project includes:
- Custom CloudBees action for running tests (
.cloudbees/actions/run-tests) - Reusable workflow for building (
.cloudbees/workflows/reusable-build.yaml) - Main CI pipeline (
.cloudbees/workflows/ci.yaml)
The CI pipeline runs on push to main/develop and on pull requests to main.