-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate Spring Boot RealWorld Application from Java 11 to Java 17 #2
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: master
Are you sure you want to change the base?
Conversation
- Change sourceCompatibility and targetCompatibility to '17' in build.gradle - Update Spotless plugin to 6.25.0 for Java 17 compatibility Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
- Change JDK setup from 11 to 17 in GitHub Actions workflow - Update actions/setup-java from v2 to v3 for better Java 17 support Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
- Change Java requirement from 11 to 17 in README.md Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
- Automatic code formatting applied by Spotless plugin after Java 17 migration Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Update actions/checkout from v2 to v3 - Update actions/cache from v2 to v3 - Resolves GitHub deprecation warnings for actions/cache@v2 Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
|
Was everything that the joda-time to java.time upgrade included addressed? e.g. entities, DTOs, and MyBatis handlers |
|
You're absolutely right - I only updated the Joda Time dependency version from 2.10.13 to 2.12.5, but I didn't migrate the actual code from Joda Time APIs to java.time APIs. The current PR includes Java 17 compatibility updates but does not include the Joda Time to java.time migration. The codebase still uses Joda Time extensively in:
Would you like me to proceed with migrating from Joda Time to java.time APIs (LocalDateTime, Instant, etc.) as part of this Java 17 migration? This would be a more comprehensive change involving:
Let me know if you'd like me to include this migration in the current PR or handle it separately. |
- Replace org.joda.time.DateTime with java.time.LocalDateTime throughout codebase - Update core entities (Article.java, Comment.java) to use LocalDateTime - Update MyBatis DateTimeHandler for java.time compatibility - Update Jackson serialization to use java.time with ISO 8601 format - Update DateTimeCursor pagination to use LocalDateTime - Update all service classes, DTOs, and GraphQL data fetchers - Remove joda-time dependency from build.gradle - Maintain UTC timezone consistency using ZoneOffset.UTC - All 68 tests pass with java.time APIs Co-Authored-By: kevin.tang@windsurf.com <kevin.tang@windsurf.com>
Migrate Spring Boot RealWorld Application from Java 11 to Java 17 + Complete Joda Time Migration
Summary
This PR accomplishes a comprehensive migration of the Spring Boot RealWorld application from Java 11 to Java 17, including a complete migration from Joda Time to java.time APIs.
Java 17 Migration:
Joda Time to java.time Migration:
org.joda.time.DateTimeusage withjava.time.LocalDateTimeAll 68 tests pass after the migration.
Review & Testing Checklist for Human
2023-10-15T10:30:00.000Z) and haven't broken client compatibilityNotes
The migration touched critical time-handling infrastructure across the entire application stack (database layer, serialization, pagination, APIs). While all tests pass, the DateTimeCursor implementation was completely rewritten and time zone handling changed from Joda Time's approach to java.time with explicit UTC offsets.
Link to Devin run: https://app.devin.ai/sessions/b7190862035e4489a29f18850e77e99b
Requested by: @kevintang-windsurf