Spring Boot drops mainDataConverter when a non-root namespace is configured

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

维护者通常 1 天内回复

@yumingjs 已经在做这个了。

开始于 2026年12月2日。

  • #3247 来自 @yumingjs —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, spring-boot
领域
backend

调研方向

Start in AutoConfigurationUtils.chooseDataConverter, then trace the downstream converter selector and the multi-namespace auto-configuration path. Add a regression test for the root and partner namespace converters using the reproduction setup in the issue; verify root workflow, schedule, and activity clients use mainDataConverter while the non-root workflow client uses assignDataConverter.

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

描述

bug

Expected Behavior

The root namespace uses the application's mainDataConverter bean. A configured non-root namespace can use its own <alias-or-namespace>DataConverter without affecting the root converter.

Actual Behavior

With a root mainDataConverter and a non-root assignDataConverter, the root clients silently fall back to the SDK's global converter. The non-root workflow client still uses assignDataConverter. Without the non-root namespace and its converter, the root clients use mainDataConverter as expected.

In AutoConfigurationUtils.chooseDataConverter, the multi-namespace path filters both mainDataConverter and the namespace-specific converters out of the candidate list. It passes mainDataConverter separately, but the downstream selector only consults it if more than one candidate remains. This setup leaves zero candidates, so the selector returns null.

Steps to Reproduce the Problem

  1. Configure spring.temporal.connection.target=local, spring.temporal.namespace=root, and spring.temporal.start-workers=false with Temporal Spring Boot auto-configuration enabled.
  2. Register two distinct DataConverter beans named mainDataConverter and assignDataConverter. Configure spring.temporal.namespaces[0].namespace=partner and spring.temporal.namespaces[0].alias=assign.
  3. Inspect temporalWorkflowClient.getOptions().getDataConverter(): it is GlobalDataConverter.get(), not the mainDataConverter bean. assignWorkflowClient still uses assignDataConverter.

Specifications

  • Reproduced with Spring Boot 2.7.18 on #3157 (04f208e7) for the root workflow, schedule, and activity client options. The same converter selection logic predates #3157 and is present on main (b9f92567).
  • Platform: macOS, JDK 21.

Reported in review of #3157. This is separate from the customizer ordering bug tracked in #3244.

主要语言
Java
星标
447
派生
278
平均合并
3 天 22 小时
30 天内合并 PR
28

环境准备

  • 没有 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 摘要。