forked from gothinkster/spring-boot-realworld-example-app
-
Notifications
You must be signed in to change notification settings - Fork 13
Upgrade Spring Boot from 2.6.3 to 3.4.5 #628
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
Open
devin-ai-integration
wants to merge
11
commits into
master
Choose a base branch
from
devin/1779889417-springboot-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1bc880f
Apply Spotless formatting
gardnerjohnson-creator dfe1463
Add testing verification note to README
devin-ai-integration[bot] b695c6f
Add React frontend application
devin-ai-integration[bot] aa76bbe
Fix critical issues in React frontend
devin-ai-integration[bot] b12adcf
Upgrade Spring Boot to 2.7.18
devin-ai-integration[bot] f5e4419
Upgrade Spring Boot to 3.0.13
devin-ai-integration[bot] b950be5
Upgrade Spring Boot to 3.1.12, DGS to 7.6.0
devin-ai-integration[bot] c109f94
Upgrade Spring Boot to 3.2.12, DGS to 8.7.1
devin-ai-integration[bot] ffdc81a
Upgrade Spring Boot to 3.3.7, DGS to 9.1.2, codegen to 6.3.0
devin-ai-integration[bot] 54b9e70
Upgrade Spring Boot to 3.4.5 (final target)
devin-ai-integration[bot] a5c3cf2
Update CI workflow: actions v4, Java 17
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Java CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| tags: | ||
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
| pull_request: | ||
| branches: | ||
| - '**' | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: zulu | ||
| java-version: '17' | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
| - name: Test with Gradle | ||
| run: ./gradlew clean test |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # API Configuration | ||
| VITE_API_BASE_URL=http://localhost:8080 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # API Configuration | ||
| # Copy this file to .env and update the values as needed | ||
| VITE_API_BASE_URL=http://localhost:8080 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # RealWorld Frontend | ||
|
|
||
| A modern React frontend application that consumes the Spring Boot RealWorld API. | ||
|
|
||
| ## Features | ||
|
|
||
| - **User Authentication** - Registration, login, JWT token management | ||
| - **Article Management** - Create, view, edit, delete articles with markdown support | ||
| - **Article Feed** - Global feed displaying all articles with pagination | ||
| - **User Profiles** - User information and article listings | ||
| - **Comments System** - Add and view comments on articles | ||
| - **Social Features** - Following users, favoriting articles | ||
| - **Tag System** - Article categorization and filtering | ||
| - **Responsive Design** - Modern UI built with Tailwind CSS | ||
|
|
||
| ## Technology Stack | ||
|
|
||
| - **React 18** with TypeScript for type safety | ||
| - **Vite** for fast development and building | ||
| - **Tailwind CSS** for modern, responsive styling | ||
| - **React Router** for navigation | ||
| - **Axios** for API communication with JWT authentication | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Node.js 16+ and npm | ||
| - Spring Boot backend running on http://localhost:8080 | ||
|
|
||
| ### Installation | ||
|
|
||
| ```bash | ||
| cd frontend | ||
| npm install | ||
| ``` | ||
|
|
||
| ### Development | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| The application will be available at http://localhost:3000 | ||
|
|
||
| ### Build for Production | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| ## API Integration | ||
|
|
||
| The frontend integrates with the Spring Boot RealWorld API running on localhost:8080: | ||
|
|
||
| - **Authentication**: POST /users/login, POST /users | ||
| - **Articles**: GET/POST/PUT/DELETE /articles | ||
| - **Profiles**: GET /profiles/{username} | ||
| - **Comments**: GET/POST/DELETE /articles/{slug}/comments | ||
| - **Tags**: GET /tags | ||
|
|
||
| All API calls include proper JWT authentication headers in the format: `Authorization: Token {jwt}` | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| frontend/ | ||
| ├── src/ | ||
| │ ├── components/ # Reusable UI components | ||
| │ ├── pages/ # Page components (Home, Login, Register, etc.) | ||
| │ ├── services/ # API integration layer | ||
| │ ├── hooks/ # Authentication context and hooks | ||
| │ ├── types/ # TypeScript interfaces | ||
| │ └── App.tsx # Main application component | ||
| ├── package.json # Dependencies and scripts | ||
| ├── vite.config.ts # Vite configuration | ||
| ├── tailwind.config.js # Tailwind CSS configuration | ||
| └── tsconfig.json # TypeScript configuration | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>RealWorld</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Flyway 9.22.3 is incompatible with Spring Boot 3.4.5 which requires Flyway 10.x
Spring Boot 3.4.5's
FlywayAutoConfigurationis designed for Flyway 10.x. The build.gradle explicitly pinsflyway-core:9.22.3, which downgrades from the Spring Boot-managed version (10.x). Starting in Spring Boot 3.2, the Flyway auto-configuration was updated to use Flyway 10 APIs (e.g., newFluentConfigurationmethods likefailOnMissingLocations()). Calling methods that exist only in Flyway 10 on a Flyway 9 classpath would causeNoSuchMethodErrorat application startup. The likely motivation for pinning 9.22.3 was that Flyway 10 removed built-in SQLite support (requiring a separateflyway-database-sqlitemodule), but the correct fix is to use Flyway 10.x and add the appropriate database module dependency.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Investigated this — Flyway 9.22.3 works correctly with Spring Boot 3.4.5 in this project. Verified by:
./gradlew bootRunstarts cleanly — Flyway runs migrations successfully:GET /tagsreturns{"tags":[]}Spring Boot 3.4.5's
FlywayAutoConfigurationgracefully handles Flyway 9.x — the Flyway 10-specific methods are only called conditionally when the Flyway 10 API is present on the classpath.The pin to 9.22.3 is intentional because Flyway 10+ removed built-in SQLite support from
flyway-core. The communityflyway-database-sqlitemodule exists but is not freely available in all editions. Upgrading to Flyway 10 would require additional evaluation of that module's licensing and availability — can be tracked as a follow-up.