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

Aperta
#3,245 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@yumingjs ci sta già lavorando.

Dal 2/12/2026.

  • #3247 di @yumingjs — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, spring-boot
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Java
Stelle
447
Fork
278
Merge medio
3g 22h
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di temporalio/sdk-java

Tutte le issue di temporalio/sdk-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.