Skip to content

Add Spring Boot auto-configuration for NexusClient - #3158

Merged
Quinn-With-Two-Ns merged 6 commits into
mainfrom
nexus-client-spring-autoconfigure
Dec 2, 2026
Merged

Quinn-With-Two-Ns merged 6 commits into
mainfrom
nexus-client-spring-autoconfigure

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

  • Expose a primary temporalNexusClient bean for the root namespace and <alias-or-namespace>NexusClient beans for non-root namespaces.
  • Support namespace-specific data converters and TemporalOptionsCustomizer<NexusClientOptions.Builder> beans, with automatic interceptor registration for the root client.
  • Add integration tests and concise documentation. Per-service clients and YAML configuration are out of scope.

Why?

Make it easy to inject and reuse a process-lifetime Nexus client, following the existing WorkflowClient and ScheduleClient Spring integration.

Closes #3122.


Note

Low Risk
Additive Spring wiring and tests following established ActivityClient patterns; a small hardening fix for non-root client customizers affects namespace scoping only.

Overview
Adds Spring Boot auto-configuration for NexusClient, mirroring the existing workflow, schedule, and activity client integration.

Applications get a @Primary temporalNexusClient for the root namespace (unless they define their own NexusClient), plus per–non-root-namespace beans named <alias-or-namespace>NexusClient. Clients are built through new NexusClientOptionsTemplate wiring in ClientTemplate/NamespaceTemplate, with namespace-specific data converters, ordered TemporalOptionsCustomizer<NexusClientOptions.Builder> beans, and automatic NexusClientInterceptor registration on the root client only.

For non-root namespaces, NonRootBeanPostProcessor now wraps workflow, activity, and nexus client customizers so a customizer that returns a fresh options builder still has the configured namespace applied on outgoing RPCs.

CHANGELOG and README document the new beans and customization naming; integration tests cover backoff, multi-namespace connections, and namespace preservation.

Reviewed by Cursor Bugbot for commit fbd51a8. Bugbot is set up for automated code reviews on this repo. Configure here.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns marked this pull request as ready for review October 20, 2026 17:50
@Quinn-With-Two-Ns
Quinn-With-Two-Ns requested a review from a team as a code owner October 20, 2026 17:50

@dplyukhin dplyukhin left a comment

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.

Same issues from #3157 apply here, plus one note about the readme.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns force-pushed the nexus-client-spring-autoconfigure branch from 05863be to cf7644c Compare December 1, 2026 22:15

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e70c196. Configure here.

Keep non-root clients available when an application supplies its own NexusClient. Document namespace bean naming and the test server's standalone Nexus limitation.
Apply the existing workflow client namespace rule to ActivityClient and NexusClient. Verify the namespace on the outgoing RPCs when a customizer returns a fresh builder.
@Quinn-With-Two-Ns
Quinn-With-Two-Ns force-pushed the nexus-client-spring-autoconfigure branch from e70c196 to ea4d7d4 Compare December 1, 2026 23:17
@Quinn-With-Two-Ns
Quinn-With-Two-Ns enabled auto-merge (squash) December 2, 2026 01:11
@Quinn-With-Two-Ns
Quinn-With-Two-Ns merged commit 72eba2d into main Dec 2, 2026
46 of 51 checks passed
@Quinn-With-Two-Ns
Quinn-With-Two-Ns deleted the nexus-client-spring-autoconfigure branch December 2, 2026 02:03
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.

Springboot NexusClient and NexusServiceClient<T> support for easier, correct SANO usage

2 participants