pom.xml Explained

What each section enables in your Spring Boot 4.0.3 + Java 21 + Thymeleaf + Spring MVC + Actuator build.

Spring Boot 4.0.3 Java 21 UI + API Actuator Tests

Artifact identity

  • groupId com.rollingstone
  • artifactId spring-boot-3-azure-aks-rest-api-poc
  • version 0.0.1-SNAPSHOT
  • final jar name app.jar

What this POM produces

Server-rendered UI
Thymeleaf templates under src/main/resources/templates.
REST APIs
Spring MVC controllers for JSON endpoints in the same runtime.
Ops endpoints
Actuator endpoints (e.g., /actuator/health) for AKS probes.

Runtime & build baseline

Spring Boot parent manages versions
Dependency versions, plugin defaults, and conventions come from spring-boot-starter-parent.

Java language level 21

Section-by-section breakdown

  • Supplies a curated dependency management “BOM” so you don’t pin versions for starters.
  • Applies build plugin defaults (compiler, surefire, packaging, etc.).
  • Enforces Spring Boot conventions for classpath layout and executable jar repackaging.

Sets the Java release level used by the compiler and aligns Boot’s defaults around that runtime.
<properties>
  <java.version>21</java.version>
</properties>

spring-boot-starter-thymeleaf
Enables server-side HTML rendering using Thymeleaf templates under resources/templates.
UI
spring-boot-starter-webmvc
Enables Spring MVC for @Controller and @RestController, routing, JSON binding, and embedded Tomcat.
API
spring-boot-starter-actuator
Adds operational endpoints (health/info/metrics) typically used by AKS readiness/liveness probes and monitoring.
Ops
Test starters
spring-boot-starter-thymeleaf-test + spring-boot-starter-webmvc-test add test support for MVC flows and template rendering.
Test

Jar naming
<finalName>app</finalName> makes the built artifact target/app.jar (useful for Dockerfiles and deployment scripts).
Executable boot jar
spring-boot-maven-plugin repackages the jar so it runs standalone and embeds dependencies under BOOT-INF/.
<build>
  <finalName>app</finalName>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
  </plugins>
</build>