Skip to content

refactor: Fixes #947 Update Spring Boot version , Spring AI version, organize imports#962

Merged
copybara-service[bot] merged 1 commit intogoogle:mainfrom
ddobrin:spring-pr
Mar 5, 2026
Merged

refactor: Fixes #947 Update Spring Boot version , Spring AI version, organize imports#962
copybara-service[bot] merged 1 commit intogoogle:mainfrom
ddobrin:spring-pr

Conversation

@ddobrin
Copy link
Copy Markdown
Contributor

@ddobrin ddobrin commented Mar 5, 2026

Update Spring Boot version to 4.0.2, update Spring AI to 2.0.0-M2, organize corresponding imports.

Note: Jackson has a minor update from 2.19.0 to 2.20.0.
Spring Boot 4.x uses Jackson 3, however with switching to the jackson-bom the major version remains the same

Updated modules:
/dev
/contrib/spring-ai

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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, primarily advancing the project to Spring Boot 4.0.2 and Spring AI 2.0.0-M2. These updates are crucial for leveraging the latest features, performance enhancements, and security fixes offered by these frameworks. Additionally, the Jackson library has been updated, and its dependency management has been refactored to use a Bill of Materials (BOM), simplifying future dependency management and ensuring consistency. Minor adjustments to test class imports were also made to accommodate the new framework versions.

Highlights

  • Spring Boot Version Update: Updated the Spring Boot framework to version 4.0.2, bringing the project up to date with the latest features and improvements.
  • Spring AI Version Update: Upgraded the Spring AI integration to version 2.0.0-M2, ensuring compatibility and access to new functionalities.
  • Jackson Dependency Management Refactor: Updated Jackson to version 2.20.2 and streamlined its dependency management by introducing the jackson-bom for consistent versioning across modules.
  • Test Dependency and Import Adjustments: Added a new Spring Boot test dependency (spring-boot-starter-webmvc-test) and adjusted import statements in test classes to align with the updated Spring Boot structure.

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

Changelog
  • contrib/spring-ai/pom.xml
    • Updated the spring-ai.version property from 1.1.0 to 2.0.0-M2.
  • dev/pom.xml
    • Added a new <dependency> for spring-boot-starter-webmvc-test with test scope.
  • dev/src/test/java/com/google/adk/web/AdkWebServerTest.java
    • Changed the import statement for AutoConfigureMockMvc from org.springframework.boot.test.autoconfigure.web.servlet to org.springframework.boot.webmvc.test.autoconfigure.
  • dev/src/test/java/com/google/adk/web/AdkWebServerUITest.java
    • Changed the import statement for AutoConfigureMockMvc from org.springframework.boot.test.autoconfigure.web.servlet to org.springframework.boot.webmvc.test.autoconfigure.
  • pom.xml
    • Updated the spring-boot.version property from 3.4.1 to 4.0.2.
    • Updated the jackson.version property from 2.19.0 to 2.20.2.
    • Added a new <dependency> for com.fasterxml.jackson:jackson-bom with pom type and import scope to the dependencyManagement section.
    • Commented out individual Jackson core, annotations, databind, datatype-jdk8, datatype-jsr310, and dataformat-yaml dependencies, now managed by the jackson-bom.
Activity
  • No human activity has been recorded for this pull request since its creation.
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
Copy Markdown
Contributor

@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 successfully updates the Spring Boot and Spring AI versions, along with the Jackson library. The changes include updating version properties in pom.xml files, adding a new test dependency in dev/pom.xml, and adjusting import statements in test classes to reflect the Spring Boot changes. The introduction of jackson-bom in the parent pom.xml is a good step towards centralized dependency management. The changes align with the stated objective of refactoring and updating dependencies.

Comment thread pom.xml
Comment on lines +172 to +201
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.core</groupId>-->
<!-- <artifactId>jackson-core</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.core</groupId>-->
<!-- <artifactId>jackson-annotations</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.core</groupId>-->
<!-- <artifactId>jackson-databind</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.datatype</groupId>-->
<!-- <artifactId>jackson-datatype-jdk8</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.datatype</groupId>-->
<!-- <artifactId>jackson-datatype-jsr310</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.fasterxml.jackson.dataformat</groupId>-->
<!-- <artifactId>jackson-dataformat-yaml</artifactId>-->
<!-- <version>${jackson.version}</version>-->
<!-- </dependency>-->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

After introducing the jackson-bom in the dependencyManagement section, these individual Jackson dependencies are now managed by the BOM. For better clarity and to avoid clutter, it would be cleaner to remove these commented-out dependencies entirely rather than leaving them commented. This aligns with good dependency management practices in Maven, where BOMs are used to centralize and simplify dependency declarations.

Repository Style Guide Reference: The principle of clean and efficient dependency management, while not explicitly stated for Maven POMs, is analogous to the 'Import Style' guideline (line 93) which promotes clarity and efficiency in code.

References
  1. The principle of clean and efficient dependency management, while not explicitly stated for Maven POMs, is analogous to the 'Import Style' guideline which promotes clarity and efficiency in code. (link)

@copybara-service copybara-service bot merged commit 2426fcd into google:main Mar 5, 2026
4 checks passed
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.

1 participant