Skip to content

Upgrade Spring Boot to 2.7.18 and enable Java 17 compatibility#68

Open
Kartikharitwal wants to merge 1 commit intodbpedia:masterfrom
Kartikharitwal:fix/java17-springboot-upgrade
Open

Upgrade Spring Boot to 2.7.18 and enable Java 17 compatibility#68
Kartikharitwal wants to merge 1 commit intodbpedia:masterfrom
Kartikharitwal:fix/java17-springboot-upgrade

Conversation

@Kartikharitwal
Copy link

@Kartikharitwal Kartikharitwal commented Feb 2, 2026

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:

  • Updated spring-boot-starter-parent to 2.7.18
  • Set java.version to 17
  • Added spring-boot-starter-web (project uses Spring MVC)

Verification:

  • mvn clean install -DskipTests "-Dskip.npm=true"
  • mvn spring-boot:run "-Dskip.npm=true"

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

  • Chores
    • Updated Java runtime requirement from Java 8 to Java 17
    • Upgraded Spring Boot framework to version 2.7.18 for improved stability, security, and long-term support
    • Enhanced web framework capabilities

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Spring Boot & Java Version Upgrade
pom.xml
Parent Spring Boot version updated from 1.5.2.RELEASE to 2.7.18; Java version property changed from 1.8 to 17; spring-boot-starter-web dependency added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: upgrading Spring Boot to 2.7.18 and setting Java version to 17 compatibility, which aligns with the PR's primary objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 11 to 15
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<version>2.7.18</version>
</parent>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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:


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application Fails to Start in Development/Deployment Mode

1 participant