Upgrade from Java 11/Spring Boot 2.6 to Java 17/Spring Boot 3.2#366
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Upgrade from Java 11/Spring Boot 2.6 to Java 17/Spring Boot 3.2#366devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Java 11 -> 17 (sourceCompatibility/targetCompatibility) - Spring Boot 2.6.3 -> 3.2.5 - Gradle wrapper 7.4 -> 8.5 - javax.* -> jakarta.* namespace migration (validation, servlet) - WebSecurityConfigurerAdapter -> SecurityFilterChain bean - antMatchers -> requestMatchers (Spring Security 6) - jjwt 0.11.2 -> 0.12.5 (new builder/parser API) - DGS GraphQL 4.9.21 -> 7.6.0 (Spring Boot 3 compatible) - MyBatis Spring Boot 2.2.2 -> 3.0.3 - rest-assured 4.5.1 -> 5.4.0 - SQLite JDBC 3.36.0.3 -> 3.45.1.0 - Updated CI workflow to JDK 17 - All 68 tests passing Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
Author
🤖 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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade Java 11/Spring Boot 2.6 to Java 17/Spring Boot 3.2
Summary
Complete migration of the RealWorld example app from Java 11 / Spring Boot 2.6.3 to Java 17 / Spring Boot 3.2.5. This is a major version upgrade touching build tooling, namespace changes, security configuration, JWT handling, and GraphQL integration.
Build & tooling:
Dependency upgrades:
Code changes:
javax.validation.*/javax.servlet.*→jakarta.validation.*/jakarta.servlet.*(21 files)WebSecurityConfigurerAdapter→SecurityFilterChainbean with lambda DSLantMatchers→requestMatchers(Spring Security 6)handleMethodArgumentNotValidsignature:HttpStatus→HttpStatusCodesetSubject/setExpiration/parserBuilder/parseClaimsJws/getBody→subject/expiration/parser/parseSignedClaims/getPayloadSignatureAlgorithm.HS512+SecretKeySpec→Keys.hmacShaKeyFor()(auto-selects HMAC algorithm from key size)onException→handleExceptionreturningCompletableFuturegraphql.relay.DefaultPageInfo→ generatedio.spring.graphql.types.PageInfoAll 68 existing tests pass locally.
Review & Testing Checklist for Human
HS512viaSignatureAlgorithm. The new code usesKeys.hmacShaKeyFor()which auto-selects algorithm by key length (≥64 bytes → HS512, 48-63 → HS384, 32-47 → HS256). The production secret inapplication.propertiesis 86 bytes so it stays HS512, but any existing tokens from a deployment using a shorter secret would break. Verify the production secret length is ≥64 bytes, or consider pinningJwts.SIG.HS512explicitly.WebSecurityConfigwas rewritten from the imperativeWebSecurityConfigurerAdapterstyle to theSecurityFilterChainbean + lambda DSL. Verify all endpoint authorization rules match the original (OPTIONS, GraphQL, articles feed, user registration/login, public GETs, etc.) by testing the API manually.PageInfo, error handling withConstraintViolationException) to ensure no behavioral regressions.POST /users,POST /users/login,GET /articles,POST /articles, etc.) and GraphQL endpoints to verify authentication, validation, and CRUD operations work.Notes
javax.crypto.*imports inDefaultJwtServicewere intentionally NOT migrated tojakarta.*— these are JDK classes (java.base module), not Jakarta EE.WebSecurityConfig.corsConfigurationSource()— functionality unchanged.