Non-root namespace Spring dependencies fail on app startup

オープン
#2,579 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, spring
領域
backend

調査の方向性

Spring Starter の BeanPostProcessor から始め、root ではない namespace と @Resource インジェクションを持つ @Component を使用して起動を再現します。WorkflowClient の作成と ObjectProvider を伴う bean のライフサイクルと、ドキュメントに記載された動作を比較します。完了の条件は、アプリケーションが正常に起動し、root ではない Temporal bean を遅延した workaround なしで注入できることです。

索引モデルが 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時間
マージ済み PR(30日)
28

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

temporalio/sdk-java のほかの issue

temporalio/sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。