feature: upgrade to Java 21 and Spring Boot 3.2 - #1047
Closed
yanmoiseev-cog wants to merge 3 commits into
Closed
yanmoiseev-cog wants to merge 3 commits into
yanmoiseev-cog wants to merge 3 commits into
Conversation
Co-Authored-By: Yan Moiseev <yan.moiseev@cognition.ai>
Co-Authored-By: Yan Moiseev <yan.moiseev@cognition.ai>
🤖 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:
|
Co-Authored-By: Yan Moiseev <yan.moiseev@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.
Summary
Moves the project to Java 21 / Spring Boot 3.2.12, so it builds on a current LTS JDK.
./gradlew clean buildis green: DGS codegen, compilation, spotless, and all 68 tests pass.Version pins: Boot
3.2.12, dependency-management1.1.7, Gradle wrapper8.10, DGS codegen plugin6.2.1, DGS starter8.6.0, MyBatis Boot starter/test3.0.4, spotless6.25.0(googleJavaFormat1.22.0), rest-assured5.4.0, jjwt0.11.5.flyway-core(Boot-managed),sqlite-jdbc, andjoda-timeare unchanged — the joda-time →java.timemigration is deliberately out of scope.Non-mechanical changes beyond the
javax.*→jakarta.*import sweep:Spring Security 6:
WebSecurityConfigurerAdapteris gone, soWebSecurityConfignow exposes aSecurityFilterChainbean using the lambda DSL. Authorization rules, permitted endpoints, stateless session policy, CSRF/CORS behavior, theHttpStatusEntryPoint(UNAUTHORIZED)entry point, and JWT filter placement are all preserved (antMatchers→requestMatchers).DGS 8 codegen now generates its own
io.spring.graphql.types.PageInfoinstead of reusinggraphql.relay.DefaultPageInfo, so the page-info builders inArticleDatafetcher/CommentDatafetcherconstruct the generated type; cursors are plain strings rather thanDefaultConnectionCursor:graphql-java:
DataFetcherExceptionHandler.onExceptionwas replaced by the asynchandleException, soGraphQLCustomizeExceptionHandlerreturnsCompletableFuture<DataFetcherExceptionHandlerResult>.CustomizeExceptionHandlerusesHttpStatusCodeper the Spring 6 signature change.spotlessJavaneeded explicitdependsOn(generateJava, compileJava, processResources)— Gradle 8 fails validation when a task consumes another task's output directory without a declared dependency, which the existingfileTree(rootDir)spotless target does.Note: this branch was developed against
avyshetsky/spring-boot-realworld-[REDACTED SECRET]-app, which we have no push access to, so the PR targets this fork.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/0be8eb687ed640e280a494a244b06d0a
Open in Devin Desktop: https://app.devin.ai/desktop/session/0be8eb687ed640e280a494a244b06d0a?variant=devin
Requested by: @yanmoiseev-cog
Devin Review