Upgrade Spring Boot to 2.7.18 and enable Java 17 compatibility#68
Upgrade Spring Boot to 2.7.18 and enable Java 17 compatibility#68Kartikharitwal wants to merge 1 commit intodbpedia:masterfrom
Conversation
📝 WalkthroughWalkthroughThe project's Maven configuration has been updated to upgrade Spring Boot from version 1.5.2.RELEASE to 2.7.18, add the spring-boot-starter-web dependency, and update the Java compiler version target from 1.8 to 17. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pom.xml`:
- Around line 11-15: The POM currently pins the parent Spring Boot version to
2.7.18 (the <parent> element with
<artifactId>spring-boot-starter-parent</artifactId> and
<version>2.7.18</version>), which is no longer community-supported; update the
<version> in that parent element to a maintained Spring Boot 3.x release, then
audit and adjust application code and dependencies for Spring Boot 3.x breaking
changes (including Jakarta namespace, dependency versions, and plugin
configurations) and ensure the project Java target (source/target or
maven-compiler-plugin) is set to a supported level (Java 17+) and run the full
test suite to verify compatibility.
🧹 Nitpick comments (1)
pom.xml (1)
44-47: Jackson 1 is actively used and cannot be removed.The classpath overlap concern is valid—spring-boot-starter-web pulls in Jackson 2, while Jackson 1 (
org.codehaus.jackson:jackson-mapper-asl:1.9.13) is explicitly declared. However, Jackson 1 is currently required: it's directly imported and used across 10+ files (SlackHandler, QANARY, QAService, TextHandler, TMDBService, NominatimService, Utility, LookupService, GenesisService, SpotlightService). Removing it would break the application.To resolve the dual JSON stack, consider migrating all Jackson 1 usages to Jackson 2 over time, but this is a larger refactor beyond removing the dependency.
| <parent> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-parent</artifactId> | ||
| <version>1.5.2.RELEASE</version> | ||
| <version>2.7.18</version> | ||
| </parent> |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Spring Boot 2.7.x latest release version 2024 2025 support status
💡 Result:
- Latest Spring Boot 2.7.x OSS (public) release: 2.7.18 (released Nov 23, 2023). It also marked the end of open source (community) support for Spring Boot 2.x. [1]
- Support status during 2024–2025: Spring Boot 2.7.x is out of OSS/community support; fixes are available only via commercial/enterprise support (not Maven Central). Spring notes Boot 2.7 entered enterprise support in Nov 2023, with ongoing enterprise-only releases and CVE fixes delivered via the Broadcom distribution channel. [2]
- Commercial/enterprise support end date: Spring announced that commercial support for Spring Boot 2.7 is extended through the end of 2026. [3]
- Evidence of continued 2.7.x releases in 2024/2025 (enterprise-only): e.g., Spring Boot 2.7.23 was released Nov 21, 2024 “for support customers” (via Broadcom packages). [4]
Sources: [1] [2] [3] [4]
🌐 Web query:
Spring Boot 2.7.18 Java version compatibility support
💡 Result:
Spring Boot 2.7.18:
- Minimum required Java version: Java 8 (JDK 1.8) (docs.spring.io)
- Compatible up to (tested/supported): Java 21 (inclusive) (docs.spring.io)
Citations:
- 1: https://docs.spring.io/spring-boot/docs/2.7.18/reference/html/getting-started.html?utm_source=openai
- 2: https://docs.spring.io/spring-boot/docs/2.7.18/reference/html/getting-started.html?utm_source=openai
Reconsider Spring Boot 2.7.18—community support ended in November 2023.
Spring Boot 2.7.18 is the latest 2.7.x open-source release, but it is no longer receiving community support as of February 2026. Only enterprise/commercial support (via Broadcom) is available through end of 2026. If community-backed support is required, consider upgrading to an actively maintained Spring Boot 3.x line. Java 17 is compatible with Spring Boot 2.7.x (supported range: Java 8–21).
🤖 Prompt for AI Agents
In `@pom.xml` around lines 11 - 15, The POM currently pins the parent Spring Boot
version to 2.7.18 (the <parent> element with
<artifactId>spring-boot-starter-parent</artifactId> and
<version>2.7.18</version>), which is no longer community-supported; update the
<version> in that parent element to a maintained Spring Boot 3.x release, then
audit and adjust application code and dependencies for Spring Boot 3.x breaking
changes (including Jakarta namespace, dependency versions, and plugin
configurations) and ensure the project Java target (source/target or
maven-compiler-plugin) is set to a supported level (Java 17+) and run the full
test suite to verify compatibility.
Fixes #58
This PR upgrades the project from Spring Boot 1.5.2.RELEASE to 2.7.18 and updates the Java target version to 17.
Reason:
Spring Boot 1.5.x and Spring Framework 4.x rely on reflection mechanisms that fail on Java 11+ due to the module system, causing:
java.lang.reflect.InaccessibleObjectException
Upgrading to Spring Boot 2.7.18 (Spring Framework 5.3.x) removes this problem and provides full Java 17 compatibility without requiring --add-opens JVM flags.
Changes:
Verification:
Build and application start successfully on Java 21 compiling to Java 17.
Note: Some integration tests require external DBpedia services and may fail locally; therefore verification was done using -DskipTests
Summary by CodeRabbit