Non-root namespace Spring dependencies fail on app startup

未关闭
#2,579 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, spring
领域
backend

调研方向

从 Spring Starter 的 BeanPostProcessor 开始,使用非 root namespace 和带有 @Resource 注入的 @Component 重现启动过程。将文档中描述的行为与涉及创建 WorkflowClient 和 ObjectProvider 的 bean 生命周期进行比较;完成的标准是应用能够成功启动,并且无需延迟 workaround 即可注入非 root Temporal bean。

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

描述

Expected Behavior

Defining non-root namespaces in the Spring Starter should allow beans to be injected.

Actual Behavior

The documentation calls out that this is supported, yet the BeanPostProcessor that creates these beans run after bean initialization, so application startup will fail.

In order to work around this, one must use an ObjectProvider to decouple component autowiring from Temporal bean creation, deferring bean finalization to either PostConstruct or app runtime.

Steps to Reproduce the Problem

  1. Create a non-root namespace configuration
  2. Create a @Component that injects a non-root WorkflowClient (using @Resource, per docs)
  3. Start the application: The app should fail to start due to the non-root namespace WorkflowClient being unavailable.

Specifications

  • Version: 1.29.0, 1.30.1
  • Platform: N/A
主要语言
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 摘要。