This project is a Spring Boot-based ACH Transaction Reporting System that utilizes XSLT to transform database-driven XML data to dynamically render a styled HTML report.
The application demonstrates a modern architecture where data is stored in an in-memory H2 database, dynamically converted to XML, and then transformed to HTML using XSLT. The system leverages Spring Data JPA for data persistence and XSLT for presentation logic, providing a clean separation of concerns.
- Database-Driven Architecture: Data stored in H2 in-memory database with JPA entities
- Dynamic XML Generation: Service layer converts database records to XML format on-the-fly
- XSLT Transformation: Uses
ach-transform.xslto convert XML into a clean, responsive HTML table - Dynamic Business Logic:
- Transactions over $25,000 are automatically flagged as
HIGH VALUE / REQUIRES APPROVAL - Standard transactions are labeled as
STANDARD / NORMAL
- Transactions over $25,000 are automatically flagged as
- HTMX Integration: Partial page updates without full reload on
/homeendpoint - Comprehensive Logging: Structured logging across all layers (Controller, Service, Config)
- H2 Console Access: Built-in database console for data inspection and management
- Java 17
- Spring Boot 3.2.0
- Spring Data JPA
- H2 Database (in-memory)
- XSLT 1.0
- HTMX 1.9.12
- Maven
- SLF4J Logging
.
├── pom.xml
└── src
└── main
├── java/org/example
│ ├── AchApplication.java
│ ├── config
│ │ └── DataInitializer.java
│ ├── controller
│ │ └── AchController.java
│ ├── model
│ │ └── AchTransaction.java
│ ├── repository
│ │ └── AchTransactionRepository.java
│ └── service
│ └── AchService.java
└── resources
├── application.properties
├── ach-transactions.xml
├── ach-transform.xsl
└── templates
└── home.html
- Java 17 or higher
- Maven 3.6 or higher
-
Navigate to the project directory
-
Run the application using Maven:
mvn spring-boot:run
-
Access the application:
- Home Page: http://localhost:8080/home
- ACH Report: http://localhost:8080/ach
- H2 Console: http://localhost:8080/h2-console
- JDBC URL:
jdbc:h2:mem:achdb - Username:
sa - Password: (leave empty)
- JDBC URL:
| Method | Endpoint | Description |
|---|---|---|
GET |
/home |
Loads home page with HTMX-enabled button to fetch transactions |
GET |
/ach |
Fetches data from database, converts to XML, and renders HTML via XSLT |
GET |
/h2-console |
Access H2 database console for data inspection |
- Database Layer: H2 in-memory database stores ACH transaction records
- Repository Layer: Spring Data JPA repository handles data access
- Service Layer: Retrieves data from database and converts to XML format
- Controller Layer: Applies XSLT transformation to convert XML to HTML
- Presentation: HTML rendered in browser with conditional formatting
Flow: Database → Repository → Service (XML generation) → Controller (XSLT transform) → HTML Response
The application includes comprehensive logging:
- INFO: High-level operations (requests, initialization, completion)
- DEBUG: Detailed step-by-step execution (data fetching, transformations)
- ERROR: Exception handling and error scenarios
Logs track the complete request lifecycle from database query to HTML response.