Skip to content

Migrate from Java 11 to Java 17#9

Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1769077709-java-17-migration
Open

Migrate from Java 11 to Java 17#9
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin/1769077709-java-17-migration

Conversation

@devin-ai-integration
Copy link
Copy Markdown

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

Summary

Migrates the Spring Boot RealWorld application from Java 11 to Java 17. This is a configuration-only change affecting:

  • build.gradle: Updated sourceCompatibility and targetCompatibility from 11 to 17
  • .github/workflows/gradle.yml: Updated CI to use JDK 17 (Zulu distribution) and upgraded GitHub Actions from v2 to v4
  • README.md: Updated documentation to reflect Java 17 requirement

Updates since last revision

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

Review & Testing Checklist for Human

  • Run the application locally with Java 17 installed (./gradlew bootRun) and verify it starts correctly
  • Run the full test suite locally with Java 17 (./gradlew clean test)
  • Test a few API endpoints manually (e.g., curl http://localhost:8080/tags) to confirm runtime behavior

Notes

CI is now passing with all tests running on Java 17. The dependencies (Spring Boot 2.6.3, MyBatis 2.2.2, Netflix DGS 4.9.21, JJWT 0.11.2) are confirmed compatible with Java 17.

I was unable to verify the changes locally as the development environment has Java 11 installed.


Link to Devin run
Requested by: @SachetCognition

Co-Authored-By: sachet.agarwal@windsurf.com <sachet.agarwal@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

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

## Background
This is a Spring Boot 2.6.3 application implementing the RealWorld social blogging platform. The codebase currently uses Java 11 and needs to be migrated to Java 17. The application uses MyBatis for ORM, SQLite database, and supports both REST and GraphQL APIs via Netflix DGS Framework.

## Files to Modify

### 1. Update build.gradle
**File:** `build.gradle`
**Location:** Lines 10-11

Change the Java version from 11 to 17:
```gradle
sourceCompatibility = '17'
targetCompatibility = '17'

2. Update GitHub Actions Workflow

File: .github/workflows/gradle.yml
Location: Lines 20-24

Update the Java version in the CI/CD pipeline:

- name: Set up JDK 17
  uses: actions/setup-java@v2
  with:
    distribution: zulu
    java-version: '17'

3. Update README.md (Optional but Recommended)

File: README.md
Location: Around line 47 (in the "How to run" or requirements section)

Update any references to Java 11 to Java 17 to reflect the new requirement.

Verification Steps

After making the changes, verify the migration by running:

  1. Clean and test: ./gradlew clean test
  2. Build the application: ./gradlew build
  3. Run the application: ./gradlew bootRun

The existing test suite includes comprehensive coverage across:

  • API layer tests (ArticlesApiTest, UsersApiTest, ProfileApiTest)
  • Service layer tests (ArticleQueryServiceTest, TagsQueryServiceTest)
  • Repository tests (MyBatisArticleRepositoryTest, MyBatisUserRepositoryTest)
  • Domain tests (ArticleTest)

All these tests should pass after the migration.

Dependencies

No dependency updates are required as the current versions are compatible with Java 17:

  • Spring Boot 2.6.3
  • MyBatis Spring Boot Starter 2.2.2
  • Netflix DGS Framework 4.9.21
  • JJWT 0.11.2

Notes

This is a low-risk migration as the codebase uses standard Java features without Java 11-specific APIs, and all dependencies alread... (114 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