Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#3,122 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
java, spring-boot
领域
backend

调研方向

Start with the Spring Boot autoconfiguration and multiple-namespace support referenced in the issue, then trace how workflow clients are configured and exposed as beans. Determine how NexusClient and NexusServiceClient<T> should fit that configuration, including non-root namespaces; done means the requested client types can be injected with the described aliases and service configuration.

由索引模型根据 Issue 内容生成。

描述

enhancement

Is your feature request related to a problem? Please describe.
Guidance in javadoc for NexusClient is Client for managing standalone Nexus operation executions. Obtain an instance via newInstance(WorkflowServiceStubs) or newInstance(WorkflowServiceStubs, NexusClientOptions). Do not create this object per request; share it for the lifetime of the process.
[here])https://www.javadoc.io/doc/io.temporal/temporal-sdk/latest/io/temporal/client/NexusClient.html).

Describe the solution you'd like

First improvement

Lifestyle correctness guidance like that should be made simpler with Spring so I can nexusClient in my controller just like I can workflowClient.
We should support this across all namespaces though using the nice "non-root" namespace config support. It is Nexus, after all, so let me call across Namespaces :) .

spring.temporal:
  namespaces:
    # I have a couple services inside my `apps` Namespace I want to use
    - namespace: apps
      alias: apps
      nexus-service-clients:
        - alias: apps-v1 
          endpoint: oms-apps-v1
          service: com.acme.oms.services.AppsService
        - alias: support-v1
          endpoint: oms-support-v1
          service: com.acme.oms.services.SupportService
// my REST Controller
// Use @Qualifier since non-root referencing alias
public AppsController(@Qualifier("apps-v1NexusClient") NexusClient appsNexusClient) {
    this.appsNC = appsNexusClient;
  }

ref: https://github.com/temporalio/sdk-java/tree/main/temporal-spring-boot-autoconfigure#running-multiple-name-space-experimental

Customization for options (interceptors,dataconverter, etc) can follow the existing path for doing such things with workflow client...ideally we could do this in configuration directly but the requirement to code those a shortcoming that already exists in our SB integration so not necessarily part of this.

Second improvement

We can do better than this though I think and support a nexus-service-clients per client so I can do something like :

spring.temporal:
  namespaces:
    # I have a couple services inside my `apps` Namespace I want to use
    - namespace: apps
      alias: apps
      nexus-service-clients:
        - alias: apps-v1 
          endpoint: oms-apps-v1
          service: com.acme.oms.services.AppsService
        - alias: support-v1
          endpoint: oms-support-v1
          service: com.acme.oms.services.SupportService
// my REST Controller
// No @Qualifier needed but I could do it with `alias` I guess
public SupportController(NexusServiceClient<SupportService> supportSvc) {
    this.supportSvc = supportSvc;
  }

Describe alternatives you've considered
Roll my own @Bean but I want it to be more approachable!

Additional context
SANO is here, let's make it dead simple to integrate All The Things!

主要语言
Java
星标
433
派生
257
平均合并
2 天 22 小时
30 天内合并 PR
22

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

temporalio/sdk-java 的其他 Issue

查看 temporalio/sdk-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。