Skip to content

Migrate from Java 11 to Java 17#10

Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1769776444-java17-migration
Open

Migrate from Java 11 to Java 17#10
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1769776444-java17-migration

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Jan 30, 2026

Summary

This PR migrates the Spring Boot RealWorld application from Java 11 to Java 17 using the conservative approach (Spring Boot 2.7.x) to maintain javax.* package compatibility without requiring source code changes.

Key changes:

  • Java source/target compatibility: 11 → 17
  • Spring Boot: 2.6.3 → 2.7.18
  • MyBatis Spring Boot Starter: 2.2.2 → 2.3.2
  • Netflix DGS: 4.9.21 → 4.10.5
  • SQLite JDBC: 3.36.0.3 → 3.45.1.0 (also changed to runtimeOnly)
  • GitHub Actions: Updated to v4 (checkout, setup-java, cache) with Java 17 and Temurin distribution

Deviations from original request:

  • DGS kept at 4.x (not 7.6.0) because DGS 7.x requires Spring Boot 3.x
  • REST Assured kept at 4.5.1 (not 5.4.0) because 5.x has breaking API changes requiring test modifications
  • SQLite JDBC version adjusted to 3.45.1.0 (3.45.0 doesn't exist in Maven Central)

Updates since last revision

  • Updated GitHub Actions from v2 to v4 (actions/checkout, actions/setup-java, actions/cache) to fix CI failures due to deprecated action versions

Review & Testing Checklist for Human

  • Verify the DGS version (4.10.5 instead of requested 7.6.0) is acceptable for your use case - DGS 7.x is incompatible with Spring Boot 2.7.x
  • Confirm the SQLite JDBC scope change from implementation to runtimeOnly is intentional and acceptable
  • Run the application locally with ./gradlew bootRun and test basic functionality (e.g., curl http://localhost:8080/tags)

Recommended test plan:

  1. Run ./gradlew clean test locally to verify all 68 tests pass
  2. Start the app with ./gradlew bootRun and test endpoints: /tags, /articles, user registration
  3. Verify GraphQL endpoint at /graphql is functional

Notes

All 68 tests pass locally with Java 17. CI is now passing. No source code changes were required since Spring Boot 2.7.x maintains javax.* package compatibility.

Link to Devin run: https://app.devin.ai/sessions/6ca877bdb446422e8a4a431656284f43
Requested by: @SachetCognition

- Update Java source/target compatibility from 11 to 17
- Upgrade Spring Boot from 2.6.3 to 2.7.18
- Update MyBatis Spring Boot Starter from 2.2.2 to 2.3.2
- Update Netflix DGS from 4.9.21 to 4.10.5 (compatible with Spring Boot 2.7.x)
- Update SQLite JDBC from 3.36.0.3 to 3.45.1.0
- Update GitHub Actions workflow to use Java 17 with Temurin distribution

Note: REST Assured kept at 4.5.1 to maintain test compatibility (5.x has breaking API changes)
Co-Authored-By: sachet.agarwal@windsurf.com <sachet.agarwal@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

Original prompt from sachet.agarwal
# Migrate Spring Boot RealWorld Application from Java 11 to Java 17

## Overview
Migrate the `SachetCognition/spring-boot-realworld-example-app` repository from Java 11 to Java 17. This is a Spring Boot 2.6.3 application that implements a social blogging platform with both REST and GraphQL APIs. The migration should maintain all business functionality including authentication, article management, comments, and social features.

## Task Details

### 1. Update Java Version in build.gradle

**File:** `build.gradle`

Update the Java source and target compatibility from version 11 to 17:

```gradle
// Current (lines 10-11):
sourceCompatibility = '11'
targetCompatibility = '11'

// Change to:
sourceCompatibility = '17'
targetCompatibility = '17'

2. Update Spring Boot Version

File: build.gradle

Upgrade Spring Boot from version 2.6.3 to 2.7.18 (line 2):

// Current:
id 'org.springframework.boot' version '2.6.3'

// Change to:
id 'org.springframework.boot' version '2.7.18'

3. Update Key Dependencies

File: build.gradle

Update the following dependencies (lines 38-45):

  • MyBatis Spring Boot Starter: Change from 2.2.2 to 2.3.2
  • Netflix DGS: Change from 4.9.21 to 7.6.0 (compatible with Spring Boot 2.7)
  • SQLite JDBC: Change from 3.36.0.3 to 3.45.0
  • Joda-Time: Keep at 2.10.13 (or consider migrating to java.time API later)
// Current:
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2'
implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:4.9.21"))
runtimeOnly 'org.xerial:sqlite-jdbc:3.36.0.3'
implementation 'joda-time:joda-time:2.10.13'

// Change to:
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.2'
implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:7.6.0"))
runtimeOnly 'org.xerial:sqlite-jdbc:3.45.0'
implementation 'joda-time:joda-time:2.10.13'

4. Update Testing Dependencies

... (1839 chars truncated...)

</details>

@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: sachet.agarwal@windsurf.com <sachet.agarwal@windsurf.com>
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.

0 participants