Appearance
Technology Stack
This document provides a comprehensive overview of the technologies, frameworks, libraries, and infrastructure that constitute the IT Ticketing Service. It is intended for developers responsible for the maintenance, extension, and modernization of the application. A clear understanding of this stack is essential for effective development and troubleshooting.
For a high-level overview of the system's components and their interactions, please refer to the Core Architecture documentation.
Core Technologies
The application is built on a foundation of industry-standard, enterprise-grade technologies. The selection of these technologies prioritizes stability, performance, and a rich ecosystem for development.
Java 17
The application is written in Java and requires a Java Development Kit (JDK) version 17 to build and run. Java 17 is a Long-Term Support (LTS) release, ensuring stability and access to modern language features such as records, sealed classes, and pattern matching for instanceof.
The required version is explicitly defined in the project's pom.xml:
xml
<!-- pom.xml -->
<properties>
<java.version>17</java.version>
</properties>1
2
3
4
2
3
4
Spring Boot 3.2.4
Spring Boot serves as the core application framework, significantly accelerating development by providing auto-configuration, an embedded web server, and simplified dependency management. The project uses version 3.2.4, which is built on Spring Framework 6.1 and requires Java 17 as a baseline.
The framework's "convention over configuration" philosophy is central to this project. A key architectural principle is to leverage Spring's externalized configuration capabilities to facilitate migration between environments (e.g., on-prem to cloud) with minimal code changes.
xml
<!-- pom.xml -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>1
2
3
4
5
6
7
2
3
4
5
6
7
Maven
Apache Maven is the build automation and dependency management tool for this project. It is responsible for:
- Resolving and managing project dependencies defined in
pom.xml. - Compiling source code.
- Running unit and integration tests.
- Packaging the application into an executable JAR file.
Developers should be familiar with standard Maven commands such as mvn clean install, mvn spring-boot:run, and mvn test. For a complete list of dependencies, see the Dependencies Reference.
Frameworks and Libraries
The application leverages several key Spring Boot starters and other libraries to provide its core functionality.
Spring Web
The spring-boot-starter-web dependency provides capabilities for building web applications, including RESTful APIs. It includes:
- Spring MVC: A robust framework for building web controllers and handling HTTP requests.
- Embedded Tomcat: The application runs on an embedded Tomcat server by default, simplifying deployment as it's packaged within the executable JAR.
- RESTful API Endpoints: The primary interface for the ticketing service is a set of REST APIs for CRUD operations.
Spring Data JPA
Data persistence is managed by Spring Data JPA via the spring-boot-starter-data-jpa dependency. This framework simplifies the implementation of the data access layer by:
- Providing an Object-Relational Mapping (ORM) layer on top of the Java Persistence API (JPA) and its default implementation, Hibernate.
- Enabling the creation of repository interfaces that automatically generate queries based on method names.
- Managing database transactions declaratively.
This aligns with the project's use of the Repository pattern for all data operations.
Spring Boot Validation
The spring-boot-starter-validation dependency provides comprehensive server-side data validation capabilities using Jakarta Bean Validation (formerly JSR-380). This enables declarative validation of domain models and request payloads using annotations such as @NotNull, @NotEmpty, @Size, and @Email. The validation framework integrates seamlessly with Spring MVC to automatically validate request bodies and path/query parameters, returning structured error responses when validation fails.
Spring AMQP
For asynchronous communication, the project uses spring-boot-starter-amqp. This starter facilitates integration with message brokers that support the Advanced Message Queuing Protocol (AMQP) 0.9.1, with RabbitMQ being the target broker. The application uses this to publish events when tickets are created or updated, decoupling the core ticketing logic from downstream consumers.
Spring Boot Actuator
The spring-boot-starter-actuator dependency is included to provide production-ready features. It exposes a set of HTTP endpoints for monitoring and managing the application. Key endpoints include:
/actuator/health: Reports the application's health status, including connectivity to the database and message broker./actuator/info: Displays arbitrary application information./actuator/metrics: Provides detailed application metrics compatible with monitoring systems like Prometheus.
Lombok
Project Lombok is used to reduce boilerplate code in model and component classes. By using annotations like @Data, @Getter, @Setter, and @Builder, developers can avoid writing standard methods manually.
Developer Note: To work with the codebase, your IDE requires the Lombok plugin to be installed. Otherwise, it will report compilation errors for missing methods. The Maven build is configured to handle this automatically via the
maven-compiler-plugin.
xml
<!-- pom.xml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
Spring Boot Test
The spring-boot-starter-test dependency provides comprehensive testing support for both unit and integration tests. It includes several powerful testing libraries:
- JUnit 5 (Jupiter): The primary testing framework for writing and running tests.
- Mockito: For creating mock objects and verifying interactions in unit tests.
- Spring Test: Provides integration testing support with application context loading and transaction management.
- AssertJ: A fluent assertion library for more readable test assertions.
- Hamcrest: Additional matchers for assertions.
This dependency is scoped to test and is only used during the build and testing phases.
Infrastructure
The application relies on external services for data storage and messaging. The local development environment is provisioned using Docker to ensure consistency. For setup instructions, see the Installation Guide.
MySQL 8.0
The primary data store is a MySQL relational database, version 8.0. The connection is managed through Spring Data JPA, using the mysql-connector-j driver.
The local development instance is defined in docker-compose.yml:
yaml
# docker-compose.yml
services:
mysql:
image: mysql:8.0
container_name: ticketing-mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ticketing
MYSQL_USER: ticketing_user
MYSQL_PASSWORD: changeme
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 101
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- Port: The database is accessible on
localhost:3306. - Credentials: Default credentials are provided for local setup but should be overridden in production environments via Spring's externalized configuration.
RabbitMQ 3.12
RabbitMQ, version 3.12, serves as the message broker for handling asynchronous events. The application connects to it using the AMQP protocol.
The local instance includes the management plugin, which is invaluable for development and debugging.
yaml
# docker-compose.yml
services:
rabbitmq:
image: rabbitmq:3.12-management
container_name: ticketing-rabbitmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- "5672:5672" # AMQP port
- "15672:15672" # Management UI
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
timeout: 20s
retries: 101
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- AMQP Port: The broker listens for application connections on
localhost:5672. - Management UI: The web-based management console is available at
http://localhost:15672(default credentials:guest/guest).
Docker and Docker Compose
Docker is used to containerize the backing services (MySQL and RabbitMQ). Docker Compose orchestrates the local development environment, allowing developers to spin up the entire infrastructure stack with a single command (docker-compose up). This approach guarantees a consistent and isolated environment for every developer.
Version Matrix
The following table summarizes the key component versions. Most library versions are managed by the spring-boot-starter-parent Bill of Materials (BOM) to ensure compatibility.
| Component | Version | Source | Notes |
|---|---|---|---|
| Java | 17 | pom.xml | Required JDK version for building and running the application. |
| Spring Boot | 3.2.4 | pom.xml | The core application framework. |
| MySQL Server | 8.0 | docker-compose.yml | The version used for local development. |
| MySQL Driver | Managed by BOM | pom.xml | mysql-connector-j. Version is determined by Spring Boot 3.2.4. |
| RabbitMQ Server | 3.12 | docker-compose.yml | The version used for local development. |
| RabbitMQ Client | Managed by BOM | pom.xml | spring-boot-starter-amqp. Version is determined by Spring Boot 3.2.4. |
| Lombok | 1.18.34 | pom.xml | Explicitly defined version for annotation processing. |
| Maven | 3.x | System | The build tool. Any modern version of Maven 3 should be compatible. |