Skip to content

Bump org.springframework.boot from 3.5.7 to 4.0.2#325

Open
rashidi wants to merge 5 commits intomasterfrom
spring-boot/upgrade-4.0.2
Open

Bump org.springframework.boot from 3.5.7 to 4.0.2#325
rashidi wants to merge 5 commits intomasterfrom
spring-boot/upgrade-4.0.2

Conversation

@rashidi
Copy link
Owner

@rashidi rashidi commented Jan 26, 2026

No description provided.

@rashidi rashidi added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Jan 26, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @rashidi, 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 dependency upgrade, moving the project to Spring Boot 4.0.2. This upgrade necessitated updates to various Spring Boot starters, Testcontainers libraries, and other core dependencies. A key change is the removal of the test-rest-assured module, streamlining the project's testing examples. The changes ensure compatibility with the latest Spring Boot ecosystem and incorporate new testing utilities.

Highlights

  • Spring Boot Version Upgrade: The project has been upgraded to Spring Boot version 4.0.2 across all modules, reflecting the latest features and improvements.
  • Dependency Updates and Refactoring: Numerous dependencies have been updated, including Testcontainers (to testcontainers-junit-jupiter and specific module variants), Jackson (tools.jackson.core), Spring Batch (new package structure org.springframework.batch.infrastructure.item), and Spring Web starters (spring-boot-starter-webmvc). New test-specific starters like spring-boot-resttestclient, spring-boot-starter-data-jpa-test, and spring-boot-starter-webmvc-test have been introduced.
  • Removal of 'test-rest-assured' Module: The entire test-rest-assured module, including its source code, tests, documentation, and build configuration, has been removed from the project. This suggests a consolidation or deprecation of its approach.
  • Configuration and Code Adjustments: Configuration files like bootstrap.yml have been merged into application.yml in cloud-jdbc-env-repo. Java import statements and code snippets (e.g., lambda parameters, @GeneratedValue annotation) have been adjusted to align with the new dependency versions and package structures.

🧠 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.

@github-actions
Copy link
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials check 9.3.0 Build Scan published

@rashidi rashidi changed the title Bump Spring Boot to version 4.0.2 Bump org.springframework.boot from 3.5.7 to 4.0.2 Jan 26, 2026
@github-actions
Copy link
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials check 9.3.0 Build Scan published

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 primarily focuses on upgrading Spring Boot to version 4.0.2, which necessitated numerous dependency updates, package renames, and the introduction of new starter dependencies across various modules. Key changes include updating Testcontainers, Jackson, and Spring Batch related packages, as well as migrating configuration in cloud-jdbc-env-repo from bootstrap.yml to application.yml. Additionally, the test-rest-assured module has been entirely removed. While most changes are straightforward dependency and package updates, there's a notable change in Author.java where @GeneratedValue was removed from an embedded ID, which could have functional implications. Overall, the changes reflect a necessary upgrade path, but attention should be paid to the ID generation behavior.

static class Id implements Serializable {

@GeneratedValue
private Long id;

Choose a reason for hiding this comment

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

high

The @GeneratedValue annotation was removed from the id field within the Id embeddable class. If this ID was previously intended to be automatically generated by the persistence provider (e.g., database sequence or identity column), its removal means the ID will no longer be generated. This could lead to null IDs or other data integrity issues if the application logic does not explicitly assign a value to this ID before persistence. Please confirm if this change is intentional and if there's an alternative mechanism for ID generation or assignment in place.

@@ -68,7 +69,7 @@ void findAll() {
assertThat(execution.getExitStatus()).isEqualTo(COMPLETED);
});

Choose a reason for hiding this comment

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

medium

Changing the lambda parameter from _ to i is a good practice for clarity, even if the parameter is not directly used within the lambda body. It improves readability by explicitly naming the parameter, which can be helpful for future maintainers understanding the lambda's signature.

        var users = jdbc.query("SELECT * FROM users", (rs, i) ->

Comment on lines +1 to +9
app.greet.name: Default
spring:
application.name: demo
cloud.config.server:
bootstrap: true
jdbc:
sql: SELECT `KEY`, `VALUE` from PROPERTIES where APPLICATION=? and PROFILE=? and LABEL=?
sql-without-profile: SELECT `KEY`, `VALUE` from PROPERTIES where APPLICATION=? and PROFILE='default' and LABEL=?
profiles.active: jdbc No newline at end of file

Choose a reason for hiding this comment

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

medium

The migration of configuration from bootstrap.yml to application.yml and the change in YAML structure from nested to flat for app.greet.name is a significant refactoring. While bootstrap.yml is deprecated in newer Spring Boot versions, ensuring all configurations are correctly translated and behave as expected is crucial. The flat property app.greet.name is a more concise way to define simple properties.

@github-actions
Copy link
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials check 9.3.0 Build Scan published

@github-actions
Copy link
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials check 9.3.0 Build Scan published

@github-actions
Copy link
Contributor

Job Summary for Gradle

Gradle Build :: gradle-build
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
spring-boot-tutorials check 9.3.0 Build Scan published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant