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 摘要。