A REST API microservice for processing financial transactions, accounts, and users built with Spring Boot, Spring Security, JWT, PostgreSQL, and JPA/Hibernate.
- User registration and authentication with JWT.
- Account management (CRUD).
- Money transactions between accounts.
- Role-based security.
- Profiles for different environments:
dev,prod. - PostgreSQL integration.
- Unit and integration testing with JUnit 5 and Spring Boot Test.
- Java 25.
- Maven.
- Spring Boot 4.0.1.
- Spring Security.
- Spring Data JPA / Hibernate.
- PostgreSQL.
- JWT (JJWT 0.12.6).
- Java 25.
- PostgreSQL.
- Clone the repository:
git clone https://github.com/wintermindset/transaction-service.git
cd transaction-service- Create a PostgreSQL database:
CREATE DATABASE bank_db;- Configure your local profile in
src/main/resources/application-dev.yaml:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/bank_db
username: postgres
password: postgres
jpa:
hibernate:
ddl-auto: update- Run the application:
mvn spring-boot:run -Dspring-boot.run.profiles=devdev: Local development withapplication-dev.yaml.prod: Production profile (application-prod.yaml) — keep it out of git and use environment variables for secrets.
- Users authenticate via
/api/auth/login. - JWT token returned must be included in
Authorization: Bearer <token>header for protected endpoints. - Roles are supported (e.g., USER, ADMIN).
mvn testIncludes unit and integration tests for services, repositories, and controllers.
This project is licensed under the MIT License. See LICENSE for details.