Skip to content

Upgrade to Java 17 and Spring Boot 3.2.5#560

Open
devin-ai-integration[bot] wants to merge 11 commits intomasterfrom
devin/1776604281-java17-springboot3-upgrade
Open

Upgrade to Java 17 and Spring Boot 3.2.5#560
devin-ai-integration[bot] wants to merge 11 commits intomasterfrom
devin/1776604281-java17-springboot3-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 19, 2026

Summary

Upgrades the project from Java 11 / Spring Boot 2.6.3 to Java 17 / Spring Boot 3.2.5. This touches build configuration, all Java source files using javax APIs, the Spring Security configuration, and several libraries with breaking API changes.

Build & tooling:

  • Java 11 → 17, Gradle 7.4 → 8.7, Spring Boot 2.6.3 → 3.2.5
  • Spring dependency-management 1.0.11 → 1.1.5, Spotless 6.2.1 → 6.25.0
  • CI workflow updated to JDK 17 and actions v4

Dependency upgrades with API migration:

  • MyBatis Spring Boot Starter 2.2.2 → 3.0.3
  • Netflix DGS 4.9.21 → 7.6.0 (codegen 5.0.6 → 6.2.1) — PageInfo switched from graphql.relay.DefaultPageInfo to codegen-generated io.spring.graphql.types.PageInfo; DataFetcherExceptionHandler.onException()handleException() returning CompletableFuture
  • JJWT 0.11.2 → 0.12.5 — parserBuilder()parser().verifyWith(), setSubject/setExpirationsubject/expiration, parseClaimsJwsparseSignedClaims, getBodygetPayload, key construction via Keys.hmacShaKeyFor()
  • Rest Assured 4.5.1 → 5.4.0
  • SQLite JDBC 3.36.0.3 → 3.45.3.0

Namespace migration: All javax.validation, javax.servlet, javax.annotation imports → jakarta.* (~20 files). javax.crypto correctly left as-is (JDK class).

Spring Security 6: Removed WebSecurityConfigurerAdapter, converted to SecurityFilterChain bean with lambda DSL, authorizeRequestsauthorizeHttpRequests, antMatchersrequestMatchers.

Spring Boot 3: handleMethodArgumentNotValid signature updated (HttpStatusHttpStatusCode).

Merge note

.github/workflows/gradle.yml was deleted on master but this PR re-introduces it (updated for JDK 17 / actions v4). Reviewer should confirm whether CI via this workflow is still desired.

Review & Testing Checklist for Human

  • CI workflow existence: gradle.yml was deleted on master. This PR keeps the file (updated for Java 17). Verify this is intentional — if CI has moved elsewhere, this file may need to be removed from the PR.
  • JJWT key size / algorithm change: Keys.hmacShaKeyFor(secret.getBytes()) auto-selects HMAC algorithm by key length (≥32 bytes → HS256, ≥48 → HS384, ≥64 → HS512). The old code hardcoded HS512. Verify jwt.secret in application properties is ≥64 bytes if HS512 is intended, otherwise existing tokens will be incompatible.
  • Security filter chain equivalence: Verify authorization rules in WebSecurityConfig are functionally equivalent — especially that GET /articles/feed (authenticated) is matched before GET /articles/** (permitAll). The rule ordering in the lambda DSL must match the old chain. Run a manual smoke test of authenticated and unauthenticated endpoints.
  • DGS PageInfo field mapping: buildArticlePageInfo / buildCommentPageInfo now use PageInfo.newBuilder() with .hasPreviousPage() / .hasNextPage(). Confirm these match the GraphQL schema field names and that pagination queries return correct cursor info.
  • ./gradlew bootRun smoke test: Unit tests pass locally, but verify the app starts and serves requests end-to-end (REST + GraphQL).

Recommended test plan: Run ./gradlew bootRun, hit a few REST endpoints (GET /articles, POST /users, GET /articles/feed with auth), and run a GraphQL query with pagination to confirm PageInfo fields are populated correctly.

Notes

  • The GraphQLCustomizeExceptionHandler now returns CompletableFuture<DataFetcherExceptionHandlerResult> (DGS 7.x async interface). The implementation wraps results with CompletableFuture.completedFuture() so behavior is effectively synchronous — this is the correct pattern for DGS 7.x.
  • Snyk security check reports 1 failure (not a required check). This is likely a pre-existing vulnerability in a transitive dependency, not introduced by this upgrade.
  • Work was parallelized across 4 child sessions (build.gradle, javax→jakarta, Spring Security, app properties) then integrated and fixed in a final pass.

Link to Devin session: https://app.devin.ai/sessions/6b6e368662274e11802ca77645e8d6fb
Requested by: @scottyandrade99


Open in Devin Review

gardnerjohnson-creator and others added 10 commits August 26, 2025 01:47
- Added a simple note confirming RealWorld API spec compliance
- This is a test change to verify PR workflow functionality

Co-Authored-By: Gardner Johnson <gardnerjohnson@gmail.com>
…st-dummy-change

Test: Add testing verification note to README
- Modern React 18 frontend with TypeScript and Tailwind CSS
- Complete RealWorld specification implementation
- User authentication with JWT token management
- Article management (create, view, edit, delete)
- Article feed with pagination
- User profiles and following functionality
- Comments system for articles
- Social features (favorites, following)
- Tag-based article categorization
- Responsive design with modern UI
- Full API integration with Spring Boot backend
- Development server on localhost:3000
- Production build support

Features implemented:
- User registration and login
- Article creation and editing with markdown support
- Global article feed
- User profiles and social following
- Comment system
- Article favoriting
- Tag filtering
- JWT authentication integration
- Error handling and validation
- Modern responsive UI design

The frontend successfully demonstrates all backend API functionality
through a visual web interface, replacing raw JSON responses with
a complete social blogging platform user experience.

Co-Authored-By: Gardner Johnson <gardnerjohnson@gmail.com>
- Remove node_modules from git tracking and add to .gitignore
- Configure environment variables for API base URL using VITE_API_BASE_URL
- Add TypeScript definitions for Vite environment variables
- Remove unused 'User' import to fix TypeScript error

Addresses the 5 critical issues identified in PR review:
1. ✅ Remove node_modules from git (added to .gitignore)
2. 🔄 Test complete user journey (next step)
3. ✅ Configure environment variables (VITE_API_BASE_URL)
4. 🔄 Verify CORS configuration (next step)
5. 🔄 Test authentication flow thoroughly (next step)

Co-Authored-By: Gardner Johnson <gardnerjohnson@gmail.com>
…d-react-frontend

Add React Frontend Application for RealWorld API
- sourceCompatibility/targetCompatibility: 11 -> 17
- Spring Boot plugin: 2.6.3 -> 3.2.5
- spring-dependency-management: 1.0.11.RELEASE -> 1.1.5
- dgs-codegen: 5.0.6 -> 6.2.1
- spotless: 6.2.1 -> 6.25.0
- mybatis-spring-boot-starter: 2.2.2 -> 3.0.3
- graphql-dgs-spring-boot-starter: 4.9.21 -> 7.6.0
- jjwt: 0.11.2 -> 0.12.5
- sqlite-jdbc: 3.36.0.3 -> 3.45.3.0
- rest-assured: 4.5.1 -> 5.4.0
- mybatis-spring-boot-starter-test: 2.2.2 -> 3.0.3
- Gradle wrapper: 7.4 -> 8.7

Co-Authored-By: Scotty Andrade <scotty.andrade@cognition.ai>
Replaced all javax.validation, javax.servlet imports with their jakarta
equivalents across 20 Java source files. javax.crypto imports in
DefaultJwtService.java are left unchanged as they are JDK classes.

Co-Authored-By: Scotty Andrade <scotty.andrade@cognition.ai>
Co-Authored-By: Scotty Andrade <scotty.andrade@cognition.ai>
…update CI workflow to Java 17

Co-Authored-By: Scotty Andrade <scotty.andrade@cognition.ai>
@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: Scotty Andrade <scotty.andrade@cognition.ai>
Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

if (!slug) return;

await commentsApi.deleteComment(slug, commentId);
setComments(comments.filter(comment => comment.id !== commentId));
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Stale closure in comment state updates causes deleted comments to reappear

Both handleCommentDelete and handleCommentSubmit in ArticleView.tsx use comments directly from the render closure instead of the functional form of setComments. If a user deletes two comments in quick succession (before the API calls complete), the second setComments call uses the stale comments array from the original render, overwriting the first deletion. For example: if comments = [A, B, C] and the user deletes A then B, both handlers close over the same [A, B, C] array. When A's API call completes, setComments([B, C]) is correct. But when B's API call completes, setComments([A, C]) is called (from the stale closure), incorrectly bringing A back. The same issue applies to handleCommentSubmit at line 103 — setComments([newComment, ...comments]) can lose a previously added comment.

Suggested change
setComments(comments.filter(comment => comment.id !== commentId));
setComments(prevComments => prevComments.filter(comment => comment.id !== commentId));
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file (frontend/src/pages/ArticleView.tsx) is not part of the Java 17 / Spring Boot 3 upgrade changes in this PR — it's a pre-existing React frontend file that appears in the diff due to merge-base differences. The stale closure observation is valid but out of scope for this PR.

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.

2 participants