A microservices-based financial ledger platform built with Spring Boot, Hibernate, and PostgreSQL.
financial-ledger-parent/
├── api-gateway/ # API Gateway service
├── transaction-service/ # Transaction management service
├── docker-compose.yml # Docker services configuration
└── pom.xml # Parent Maven configuration
- Java 17 or higher
- Maven 3.6+
- Docker and Docker Compose
- VSCode with Java extensions
Install the following extensions for optimal development experience:
- Extension Pack for Java (
vscjava.vscode-java-pack) - Maven for Java (
vscjava.vscode-maven) - Spring Boot Dashboard (
vscjava.vscode-spring-boot-dashboard) - Spring Initializr (
vscjava.vscode-spring-initializr)
If your IDE is not recognizing Hibernate annotations, follow these steps:
Make sure you have the Java extensions installed in VSCode:
- Extension Pack for Java
- Maven for Java
- Spring Boot Dashboard
After installing extensions, reload VSCode:
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type "Developer: Reload Window" and press Enter
- Open the Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Type "Maven: Reload Projects" and press Enter
- Or right-click on
pom.xmland select "Reload Projects"
Run the following commands in the terminal:
# From the root directory
mvn clean compile
# Or from individual service directories
cd transaction-service
mvn clean compile- Open Command Palette
- Type "Java: Restart Language Server"
- Wait for the language server to restart
Ensure Hibernate dependencies are properly included:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>This includes:
hibernate-corejakarta.persistence-apispring-data-jpa
git clone <repository-url>
cd financial-ledger-parentmvn clean compiledocker-compose up -d# Transaction Service
cd transaction-service
mvn spring-boot:run
# API Gateway
cd api-gateway
mvn spring-boot:run-
Check Java Version: Ensure you're using Java 17
java -version
-
Clear Maven Cache: Sometimes clearing the Maven cache helps
mvn dependency:purge-local-repository
-
Reimport Dependencies: Force reimport of Maven dependencies
mvn dependency:resolve
-
Check VSCode Java Settings: Ensure these settings are in
.vscode/settings.json:{ "java.configuration.maven.annotationProcessing.enabled": true, "java.compile.nullAnalysis.mode": "automatic", "java.configuration.updateBuildConfiguration": "automatic" } -
Restart Java Language Server:
- Command Palette → "Java: Restart Language Server"
- Lombok Not Working: Ensure Lombok is properly configured in
pom.xml - Import Issues: Use
Cmd+Shift+O(macOS) orCtrl+Shift+O(Windows/Linux) to organize imports - Build Errors: Check that all dependencies are resolved with
mvn dependency:tree
- Port: 8081
- Description: Manages financial transactions
- Database: PostgreSQL
- Key Features:
- CRUD operations for transactions
- Idempotency support
- Transaction status management
- Port: 8080
- Description: Centralized API gateway
- Features:
- Route management
- Load balancing
- Security
The transaction service uses the following main entities:
Transaction: Core transaction entity with Hibernate annotationsTransactionStatus: Enum for transaction statesTransactionType: Enum for transaction types
- Follow the existing code structure
- Use Hibernate annotations for entity mapping
- Include proper validation annotations
- Write unit tests for new features
- Follow Spring Boot best practices
This project is licensed under the MIT License.