Skip to content

chore: Port core functional logic for Spring Boot 4.0 / Spring Framework 7.0 upgrade#4313

Merged
prathmeshcc merged 2 commits intoGoogleCloudPlatform:8.0-migrationfrom
prathmeshcc:8.x
Feb 12, 2026
Merged

chore: Port core functional logic for Spring Boot 4.0 / Spring Framework 7.0 upgrade#4313
prathmeshcc merged 2 commits intoGoogleCloudPlatform:8.0-migrationfrom
prathmeshcc:8.x

Conversation

@prathmeshcc
Copy link

This PR addresses the core functional changes required to upgrade the project to Spring Boot 4.0 and Spring Framework 7.0. The focus was on surgically resolving compilation failures and breaking API changes while maintaining strict consistency with the project's established Java 8 syntax and formatting conventions.

Key Changes:

  • Spring Data 4.0 Migration:

    • Refactored GqlDatastoreQuery and repository lookup strategies to adopt ValueExpressionDelegate.
    • Resolved failures caused by the removal of SpelEvaluator, SpelQueryContext, and QueryMethodEvaluationContextProvider.
    • Updated TypeInformation and PropertyPath imports to the new org.springframework.data.core package.
  • Spring Framework 7.0 Refactoring:

    • Aligned HttpHeaders usage in GoogleConfigPropertySourceLocator with the new non-Map API by switching from containsKey() to containsHeader().
  • Spring Security 7.0 DSL Update:

    • Migrated security configuration in samples (e.g., spring-cloud-gcp-security-iap-sample) from the deprecated chained fluent API to the modern lambda-based DSL.
  • Autoconfigure & Dependency Management:

    • Updated spring-cloud-gcp-autoconfigure to include granular Spring Boot 4.0 modules (e.g., spring-boot-transaction, spring-boot-health).
    • Streamlined pom.xml files to remove redundant version overrides already managed by the Spring Boot 4.0 BOM.

Technical Implementation Details

  • Surgical Precision: All changes were applied with minimal diff noise. Deprecated constructor paths were maintained where possible but bridged to new logic to keep the integration clean.
  • Build Status: Verified that the project compiles successfully across all modules and samples using ./mvnw clean compile.

Testing Performed

  • Executed full reactor build: ./mvnw clean compile -DskipTests -Dcheckstyle.skip -Dfmt.skip.
  • Targeted compilation checks for affected modules: Datastore, Spanner, Firestore, and IAP Security sample.

- Upgrade Spring Boot to 4.0.0 and Spring Cloud to 2025.1.0
- Update documentation and remove legacy .jdk8 markers
@prathmeshcc prathmeshcc requested review from a team as code owners February 6, 2026 21:16
@prathmeshcc prathmeshcc changed the base branch from main to 8.0-migration February 9, 2026 15:50
this.datastoreOperations = datastoreOperations;
}

public DatastoreQueryLookupStrategy(
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems like a breaking change, is there a reason why you're removing it?

Copy link
Author

Choose a reason for hiding this comment

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

The QueryMethodEvaluationContextProvider has been deprecated in Spring Data 2025.01 release notes in favor of ValueExpressionDelegate so we can only support ValueExpressionDelegate.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks! can you keep track of breaking changes we made to the API so we can include them in the release notes.

Something like:

removed DatastoreQueryLookupStrategy constructor due to spring data removal of QueryMethodEvaluationContextProvider. Users should migrate to DatastoreQueryLookupStrategy

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to @ldetmer's comments

* @param evaluationContextProvider the provider used to evaluate SpEL expressions in queries.
* @param datastoreMappingContext used for getting metadata about entities.
*/
public GqlDatastoreQuery(
Copy link
Contributor

Choose a reason for hiding this comment

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

removing public methods is a breaking change, is there a reason this has to be removed?

Copy link
Author

Choose a reason for hiding this comment

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

The QueryMethodEvaluationContextProvider has been deprecated in Spring Data 2025.01 release notes in favor of ValueExpressionDelegate so we can only support ValueExpressionDelegate which means removing this constructor.

Copy link
Contributor

Choose a reason for hiding this comment

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

same here, lets keep track of the breaking changes for release notes

* SpannerTemplate, ValueExpressionDelegate, SpelExpressionParser)} instead.
*/
@Deprecated
public SpannerQueryLookupStrategy(
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we can remove since it was already deprecated, but flagging to confirm with @jinseopkim0

Copy link
Contributor

Choose a reason for hiding this comment

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

flag in release notes

* SpannerTemplate, ValueExpressionDelegate, SpelExpressionParser)} instead.
*/
@Deprecated
SqlSpannerQuery(
Copy link
Contributor

Choose a reason for hiding this comment

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

flagging removal of deprecated method

Copy link
Contributor

Choose a reason for hiding this comment

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

also lets note in release notes

@ldetmer ldetmer self-requested a review February 10, 2026 14:55
@prathmeshcc prathmeshcc merged commit a9fffd3 into GoogleCloudPlatform:8.0-migration Feb 12, 2026
7 of 13 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.

3 participants

Comments