Skip to content

Conversation

@teetangh
Copy link
Contributor

@teetangh teetangh commented Jan 6, 2026

Summary

This PR upgrades the project from Spring Boot 3.5.5 to Spring Boot 4.0.1 along with all dependencies to their latest versions. This is a major version upgrade that supersedes and consolidates all open Dependabot PRs.

Dependency Updates

Dependency Previous Updated
Spring Boot 3.5.5 4.0.1
springdoc-openapi 2.8.5 3.0.1
Couchbase Java SDK 3.7.9 3.10.0
Lombok 1.18.38 1.18.42
maven-surefire-plugin 3.5.2 3.5.4
maven-failsafe-plugin 3.5.2 3.5.4
spring-tx 6.2.5 Removed (managed by Spring Boot parent)

Spring Boot 4 Migration Changes

Application.java

  • Removed SecurityAutoConfiguration.class exclusion (class has been moved/removed in Spring Boot 4)

Integration Tests

  • Updated TestRestTemplate import from org.springframework.boot.test.web.client.TestRestTemplate to org.springframework.boot.resttestclient.TestRestTemplate
  • Added @AutoConfigureTestRestTemplate annotation to all test classes
  • Removed DataRetrievalFailureException from catch blocks (not needed since this project uses raw Couchbase SDK, not Spring Data)

Dependencies

  • Added spring-boot-starter-webmvc-test (test scope) - required for Spring Boot 4 testing
  • Added spring-boot-starter-restclient (test scope) - required for TestRestTemplate in Spring Boot 4

Configuration

  • Updated comment in application.properties to reflect Spring Boot 4.0+
  • Added springdoc enablement properties (disabled by default in springdoc 3.x)

Supersedes Dependabot PRs

Test Plan

  • All 18 integration tests pass locally
  • CI passes on Java 17
  • CI passes on Java 21

- Spring Boot: 3.5.5 → 4.0.1
- springdoc-openapi: 2.8.5 → 3.0.1
- Couchbase Java SDK: 3.7.9 → 3.10.0
- Lombok: 1.18.38 → 1.18.42
- maven-surefire-plugin: 3.5.2 → 3.5.4
- maven-failsafe-plugin: 3.5.2 → 3.5.4
- Removed spring-tx dependency (managed by Spring Boot parent)

Spring Boot 4 migration changes:
- Removed SecurityAutoConfiguration exclusion (class moved in Spring Boot 4)
- Updated TestRestTemplate import to org.springframework.boot.resttestclient
- Added @AutoConfigureTestRestTemplate annotation to test classes
- Removed DataRetrievalFailureException from catch blocks (not needed with raw SDK)
- Added spring-boot-starter-webmvc-test and spring-boot-starter-restclient test deps
- Enabled springdoc-openapi (disabled by default in 3.x)
@gemini-code-assist
Copy link

Summary of Changes

Hello @teetangh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a significant upgrade of the project's core framework, moving from Spring Boot 3.5.5 to 4.0.1. This update brings all associated dependencies to their latest stable versions and addresses breaking changes introduced in Spring Boot 4, particularly in how testing utilities and security configurations are handled. The goal is to ensure the application remains current with the latest Spring ecosystem, benefiting from performance improvements, new features, and security patches.

Highlights

  • Spring Boot Upgrade: The project has been upgraded from Spring Boot 3.5.5 to the latest major version, 4.0.1, consolidating several pending Dependabot updates.
  • Dependency Updates: Key dependencies such as springdoc-openapi (2.8.5 to 3.0.1), Couchbase Java SDK (3.7.9 to 3.10.0), and Lombok (1.18.38 to 1.18.42) have been updated to their latest versions. The spring-tx dependency has been removed as it is now managed by the Spring Boot parent.
  • Integration Test Refactor: Integration tests have been updated to align with Spring Boot 4 changes, including updating TestRestTemplate imports, adding the @AutoConfigureTestRestTemplate annotation, and removing DataRetrievalFailureException from catch blocks where it was no longer relevant for raw Couchbase SDK usage.
  • New Test Dependencies: Two new test-scoped dependencies, spring-boot-starter-webmvc-test and spring-boot-starter-restclient, have been added to support Spring Boot 4 testing requirements.
  • Configuration Updates: The application.properties file has been updated to reflect Spring Boot 4.0+ in comments and now includes properties to explicitly enable springdoc-openapi API documentation, which is disabled by default in version 3.x.
  • Application Class Changes: The SecurityAutoConfiguration.class exclusion has been removed from the @SpringBootApplication annotation in Application.java due to changes in Spring Boot 4.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively upgrades the project to Spring Boot 4.0.1 and updates several other dependencies to their latest versions. The changes are well-documented in the pull request description, covering necessary adjustments in the application code, test configurations, and properties for the major version bump. The migration steps, such as updating TestRestTemplate usage and removing obsolete configurations, have been correctly applied. My review focuses on improving the maintainability of the pom.xml by suggesting the use of properties for dependency and plugin versions, which will make future updates easier and less error-prone. Overall, this is a solid upgrade.

- Add lombok.version property and use it in dependency and annotation processor
- Add springdoc.version property and use it in springdoc-openapi dependency
- Update mavensurefire.version to maven-surefire.version with value 3.5.4
- Use maven-surefire.version for both surefire and failsafe plugins (same release)
- Remove unused swagger.version and springweb.version properties
@teetangh
Copy link
Contributor Author

teetangh commented Jan 6, 2026

Addressed all Gemini code review comments in commit 33c2fc5:

  • Added lombok.version property (used in both dependency and annotation processor)
  • Added springdoc.version property
  • Updated mavensurefire.versionmaven-surefire.version with value 3.5.4
  • Using same maven-surefire.version for both surefire and failsafe plugins (they're from the same project and always released together)
  • Removed unused swagger.version and springweb.version properties

@teetangh teetangh self-assigned this Jan 6, 2026
@teetangh teetangh merged commit a6c393a into main Jan 6, 2026
3 checks passed
@teetangh teetangh deleted the fix/spring-boot-4-upgrade branch January 6, 2026 09:20
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