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

Đang mở
#3,245 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@yumingjs đang làm issue này rồi.

Từ ngày 2/12/2026.

  • #3247 của @yumingjs — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, spring-boot
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
447
Fork
278
Merge trung bình
3 ngày 22 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của temporalio/sdk-java

Tất cả issue của temporalio/sdk-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.