-
Notifications
You must be signed in to change notification settings - Fork 1
TECH_DEBT: Updating Java and Spring Boot Versions #1510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,9 @@ springdoc: | |
| enabled: false | ||
|
|
||
| spring: | ||
| threads: | ||
| virtual: | ||
| enabled: true | ||
|
|
||
| cloud: | ||
| discovery: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| <parent> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-parent</artifactId> | ||
| <version>3.2.5</version> | ||
| <version>3.4.3</version> | ||
| <relativePath/> | ||
| </parent> | ||
|
|
||
|
|
@@ -20,10 +20,13 @@ | |
| <description>Project/folder of Java modules/services for Link</description> | ||
|
|
||
| <properties> | ||
| <java.version>21</java.version> | ||
| <cqf-fhir.version>3.12.0</cqf-fhir.version> | ||
| <hapi-fhir.version>7.6.1</hapi-fhir.version> | ||
| <janino.version>2.7.8</janino.version> | ||
| <jacoco.version>0.8.12</jacoco.version> | ||
| <spring-cloud.version>2024.0.0</spring-cloud.version> | ||
| <spring-cloud-azure.version>5.19.0</spring-cloud-azure.version> | ||
| </properties> | ||
|
|
||
| <modules> | ||
|
|
@@ -59,25 +62,61 @@ | |
|
|
||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework</groupId> | ||
| <artifactId>spring-framework-bom</artifactId> | ||
| <version>6.2.3</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.swagger.core.v3</groupId> | ||
| <artifactId>swagger-annotations-jakarta</artifactId> | ||
| <version>2.2.28</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.swagger.core.v3</groupId> | ||
| <artifactId>swagger-models-jakarta</artifactId> | ||
| <version>2.2.28</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.swagger.core.v3</groupId> | ||
| <artifactId>swagger-core-jakarta</artifactId> | ||
| <version>2.2.28</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.cloud</groupId> | ||
| <artifactId>spring-cloud-dependencies</artifactId> | ||
| <version>${spring-cloud.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.azure.spring</groupId> | ||
| <artifactId>spring-cloud-azure-dependencies</artifactId> | ||
| <version>${spring-cloud-azure.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.opentelemetry</groupId> | ||
| <artifactId>opentelemetry-bom</artifactId> | ||
| <version>1.38.0</version> | ||
| <version>1.47.0</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.opentelemetry.instrumentation</groupId> | ||
| <artifactId>opentelemetry-instrumentation-bom-alpha</artifactId> | ||
| <version>2.4.0-alpha</version> | ||
| <version>2.13.0-alpha</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.opentelemetry.instrumentation</groupId> | ||
| <artifactId>opentelemetry-runtime-telemetry-java17</artifactId> | ||
| <version>2.4.0-alpha</version> | ||
| <version>2.13.0-alpha</version> | ||
| </dependency> | ||
|
Comment on lines
101
to
120
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify OpenTelemetry API changes that might affect code in the repository
# Search for OpenTelemetry usage patterns that may have changed between versions
echo "=== Searching for ResourceAttributes usage (deprecated in newer versions) ==="
rg -n "ResourceAttributes" --type java
echo "=== Searching for OpenTelemetry SDK configuration patterns ==="
rg -n "SdkTracerProvider|SdkMeterProvider|AutoConfiguredOpenTelemetrySdk" --type javaRepository: lantanagroup/link-cloud Length of output: 1503 🏁 Script executed: cat -n Java/validation/src/main/java/com/lantanagroup/link/validation/configs/OpenTelemetryConfig.javaRepository: lantanagroup/link-cloud Length of output: 4410 🏁 Script executed: cat -n Java/measureeval/src/main/java/com/lantanagroup/link/measureeval/configs/OpenTelemetryConfig.javaRepository: lantanagroup/link-cloud Length of output: 4028 🏁 Script executed: # Check if there are any other OpenTelemetry related files
fd -e java -t f | xargs grep -l "opentelemetry" | head -20Repository: lantanagroup/link-cloud Length of output: 1550 🏁 Script executed: grep -n "opentelemetry" Java/measureeval/src/main/java/com/lantanagroup/link/measureeval/services/MeasureEvalMetrics.javaRepository: lantanagroup/link-cloud Length of output: 309 🏁 Script executed: grep -n "opentelemetry" Java/validation/src/main/java/com/lantanagroup/link/validation/services/MetricService.javaRepository: lantanagroup/link-cloud Length of output: 219 🏁 Script executed: grep -n "opentelemetry" Java/measureeval/src/main/java/com/lantanagroup/link/measureeval/filters/TracingFilter.javaRepository: lantanagroup/link-cloud Length of output: 108 🌐 Web query:
💡 Result: OpenTelemetry Java (opentelemetry-java) migration: 1.38.0 → 1.47.0 (breaking changes you must handle)Use the BOM and upgrade all 1) 1.39.0 (2024-06-07) — Incubator + Prometheus exporter breaking changes
2) 1.42.0 (2024-09-06) — Logs AnyValue body stabilization (type + package rename)
3) 1.46.0 (2025-01-10) — Autoconfigure: deprecated property removed
4) 1.47.0 (2025-02-07) — Event API/SDK removed
Quick “what to do” checklist
Sources: OpenTelemetry Java 🌐 Web query:
💡 Result: Breaking / migration-impacting changes called out in upstream opentelemetry-java-instrumentation release notes between v2.4.0 and v2.13.0 (these affect the
Sources: GitHub release notes for v2.13.0 [1], v2.12.0 [2], v2.11.0 [3], v2.10.0 [4], v2.9.0 [5], v2.8.0 [6], v2.6.0 [7], v2.4.0 [8]. Verify RuntimeMetrics metric unit compatibility with downstream systems. The OpenTelemetry BOM update (1.38.0 → 1.47.0) and instrumentation update (2.4.0-alpha → 2.13.0-alpha) introduce significant changes. Most breaking changes in these ranges do not affect the code here (e.g., Event API removal, AnyValue renaming, Prometheus exporter config). However, v2.8.0 introduced a breaking change directly affecting this codebase: Java 17 runtime metrics now emit in seconds instead of milliseconds when using Confirm that downstream systems consuming these metrics expect second-based units, or update the metric unit configuration accordingly. 🤖 Prompt for AI Agents |
||
|
|
||
| <dependency> | ||
|
|
@@ -92,11 +131,6 @@ | |
| <version>${janino.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>com.azure.spring</groupId> | ||
| <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId> | ||
| <version>5.11.0</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>io.jsonwebtoken</groupId> | ||
|
|
@@ -126,7 +160,7 @@ | |
| <dependency> | ||
| <groupId>org.springdoc</groupId> | ||
| <artifactId>springdoc-openapi</artifactId> | ||
| <version>2.5.0</version> | ||
| <version>2.8.5</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
|
|
@@ -171,11 +205,6 @@ | |
| <scope>import</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>com.azure</groupId> | ||
| <artifactId>azure-storage-blob</artifactId> | ||
| <version>12.32.0</version> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
| </project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Spring Boot 3.4 jarmode tools extract CDS archive generation💡 Result:
To generate a CDS (AppCDS) archive for a Spring Boot 3.4 executable JAR, you use the
toolsjarmode to extract the JAR into a CDS-friendly layout, then do a “training run” that writes the archive on exit, and finally launch using that archive.1) Extract the executable JAR (CDS-friendly layout)
This
toolsjarmodeextractcommand is the modern replacement for-Djarmode=layertools extract. [1]2) Training run: generate the CDS archive (
application.jsa)Run from the extracted directory (so the classpath/layout is stable for CDS):
cd application java -XX:ArchiveClassesAtExit=application.jsa \ -Dspring.context.exit=onRefresh \ -jar my-app.jarThis produces
application.jsa. [2][3]3) Production run: use the archive
(Again, run using the same extracted layout.) [2][3]
Buildpacks (optional, container images)
If you build an image with Paketo buildpacks via Spring Boot, you can enable automatic CDS training + packaging by setting:
BP_JVM_CDS_ENABLED=true[4][5]And if the training run needs different JVM/app options (e.g., to prevent early DB connections), you can use:
CDS_TRAINING_JAVA_TOOL_OPTIONS[5]Sources: Spring Boot 3.3+
toolsjarmode (still applies to 3.4) [1], Spring Boot CDS reference/how-to docs [2][4], Spring blog (CDS + self-extracting JAR workflow) [5].Add missing CDS archive training run.
The
extract --launchercommand only creates the application structure; it does not generate theapplication.jsaCDS archive. A separate training run is required between extraction and production:Required Docker step
RUN java -Djarmode=tools -jar measureeval.jar extract --launcher --destination . --force && \ java -XX:ArchiveClassesAtExit=application.jsa \ -Dspring.context.exit=onRefresh \ org.springframework.boot.loader.launch.JarLauncherWithout this step, the
ENTRYPOINTwill fail when attempting to load the non-existentapplication.jsaarchive.🤖 Prompt for AI Agents