Skip to content

[DO NOT MERGE] Spring 4 support#2786

Open
cretz wants to merge 2 commits intotemporalio:masterfrom
cretz:spring-4-support
Open

[DO NOT MERGE] Spring 4 support#2786
cretz wants to merge 2 commits intotemporalio:masterfrom
cretz:spring-4-support

Conversation

@cretz
Copy link
Member

@cretz cretz commented Feb 13, 2026

What was changed

  • Added temporal-spring-boot-autoconfigure-4 and temporal-spring-boot-starter-4 modules for Spring Boot 4.0.2 support (Java 17+)
  • Extracted 28 shared source files and all tests into temporal-spring-boot-shared/src/ (not a Gradle module — both temporal-spring-boot-autoconfigure and temporal-spring-boot-autoconfigure-4 compile it via srcDir)
  • Only the 7 @ConfigurationProperties classes in io.temporal.spring.boot.autoconfigure.properties are version-specific (@ConstructorBinding removed for SB4)
  • SB4 modules use --release 17 and AutoConfiguration.imports only (no spring.factories)
  • Added springBoot4Version = '4.0.2' to root build.gradle
  • Added both new modules to settings.gradle and temporal-bom/build.gradle
  • Updated gradle/linting.gradle to run spotless on temporal-spring-boot-shared/src/ at the root project level (spotless requires targets within the project dir)
  • Updated .github/workflows/ci.yml to exclude SB4 test tasks from the unit_test_jdk8 job (-x :temporal-spring-boot-autoconfigure-4:test -x :temporal-spring-boot-starter-4:test) since that job runs on JDK 11
  • Bumped .github/workflows/publish-snapshot.yml and .github/workflows/prepare-release.yml from JDK 11 to JDK 17
  • Added READMEs with cross-references between SB 2/3 and SB4 modules

Leans on #2783 (since both are in same fork, hard to target it without forcing PR to be on the fork too, will update when other merged, for now ignore the Jackson 3 parts).

We're going to have to pay attention to publish workflows to make sure they work at release time.

DO NOT MERGE - we are going to wait on Jackson 3 support in #2783 to be merged first.

Checklist

  1. Closes Spring Boot 4 Support #2738

@cretz cretz changed the title Spring 4 support [DO NOT MERGE] Spring 4 support Feb 13, 2026
@cretz cretz marked this pull request as ready for review February 13, 2026 21:45
@cretz cretz requested a review from a team as a code owner February 13, 2026 21:45
implementation "org.springframework.boot:spring-boot-starter"

api project(':temporal-spring-boot-autoconfigure-4')
api project(':temporal-sdk')
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be compileOnly like the original springboot auto-configure is no?

targetCompatibility = sb4JavaVersion
}

// Override the --release 8 flag set by gradle/java.gradle
Copy link
Contributor

Choose a reason for hiding this comment

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

Could probably just not set these for this subproject , but this is fine to

# Temporal Spring Boot
# Temporal Spring Boot (Spring Boot 2/3)

> **This module supports Spring Boot 2.7.x and 3.x only.**
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also have an issue to update the docs as well https://docs.temporal.io/develop/java/spring-boot-integration

@Quinn-With-Two-Ns
Copy link
Contributor

Only the 7 @ConfigurationProperties classes in io.temporal.spring.boot.autoconfigure.properties are version-specific (@ConstructorBinding removed for SB4)

Hmm I still see @ConstructorBinding in Springboot 4?

https://docs.spring.io/spring-boot/api/java/org/springframework/boot/context/properties/bind/ConstructorBinding.html

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.

Spring Boot 4 Support

2 participants