Upgrade to Java 17 and Spring Boot 3.2.0#364
Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
Open
Upgrade to Java 17 and Spring Boot 3.2.0#364devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
Conversation
- Update sourceCompatibility/targetCompatibility from 11 to 17 - Upgrade Spring Boot from 2.6.3 to 3.2.0 - Upgrade Gradle wrapper from 7.4 to 8.5 - Upgrade spring-dependency-management to 1.1.4 - Upgrade MyBatis Spring Boot Starter from 2.2.2 to 3.0.3 - Upgrade Netflix DGS from 4.9.21 to 8.7.1 (platform BOM) - Upgrade DGS codegen plugin from 5.0.6 to 6.0.3 - Migrate all javax.validation imports to jakarta.validation - Migrate all javax.servlet imports to jakarta.servlet - Update WebSecurityConfig: remove WebSecurityConfigurerAdapter, use SecurityFilterChain bean with lambda DSL, replace antMatchers with requestMatchers - Update CustomizeExceptionHandler: HttpStatus -> HttpStatusCode in handleMethodArgumentNotValid override signature - Update GraphQLCustomizeExceptionHandler: onException -> handleException returning CompletableFuture - Fix PageInfo type mismatch in ArticleDatafetcher and CommentDatafetcher (graphql.relay.PageInfo -> generated type) - Update CI workflow to JDK 17 - Update README Java requirement to 17 Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
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:
|
Fix Groovy version conflict between org.codehaus.groovy:groovy:3.0.9 (from rest-assured 4.x) and org.apache.groovy:groovy:4.0.x (from Spring Boot 3). rest-assured 5.x uses the new Apache Groovy coordinates. Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
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 to Java 17 and Spring Boot 3.2.0
Summary
Major version upgrade from Java 11 / Spring Boot 2.6.3 to Java 17 / Spring Boot 3.2.0 across the build system, runtime dependencies, and application code.
Build & tooling:
sourceCompatibility,targetCompatibility, CI workflow)Code migration:
javax.validation.*/javax.servlet.*→jakarta.validation.*/jakarta.servlet.*(21 files)WebSecurityConfigurerAdapterremoved; replaced withSecurityFilterChainbean using lambda DSLantMatchers→requestMatchers,authorizeRequests→authorizeHttpRequestshandleMethodArgumentNotValidsignature:HttpStatus→HttpStatusCodeDataFetcherExceptionHandler.onException()→handleException()returningCompletableFuturegraphql.relay.DefaultPageInfo→ generatedio.spring.graphql.types.PageInfobuilder in GraphQL datafetchersVerification: Full test suite (
./gradlew clean test) passes locally. CI build jobs pass. Snyk security check fails on a pre-existing vulnerability (non-required check, not introduced by this PR).Review & Testing Checklist for Human
antMatchers/authorizeRequeststorequestMatchers/authorizeHttpRequestscan subtly change matching behavior (Spring Security 6 is stricter about trailing slashes and servlet path matching). Manually test authenticated vs. unauthenticated access to key endpoints (/users,/users/login,/articles/feed,/tags,/graphql).PageInfoconstruction was rewritten fromDefaultPageInfoto the generated builder type. Also verify theGraphQLCustomizeExceptionHandlerstill surfaces validation errors correctly now thathandleExceptionreturnsCompletableFuture.Suggested test plan:
./gradlew clean testand confirm all tests pass./gradlew bootRun, then manually hit:GET /tags(public),POST /users(register),POST /users/login(login),GET /articles/feedwith auth token (authenticated), and a GraphQL query to/graphqlNotes
javax.crypto.*imports were intentionally left unchanged (JDK package, not Jakarta EE).WebSecurityConfigwere removed during refactor.Link to Devin run: https://app.devin.ai/sessions/6489edd6323a4931bee45fb016dd96b6
Requested by: @iancmoritz