Skip to content

Non-root namespace Spring dependencies fail on app startup #2579

@robzienert

Description

@robzienert

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions