Skip to content

Refactor Spring Boot documentation and spring-boot-examples #1553

Open

Description

@salaboy

Describe the proposal

The Spring Boot documentation provides a high-level introduction to using Dapr through the Dapr Spring Boot Starter and Dapr Spring Boot Starter Tests, which heavily integrate with Testcontainers.

Currently, the spring-boot-examples/ directory has three applications:

  • Producer: To demonstrate basic APIs such as PubSub and StateStore integrated with Spring
  • Consumer: To demonstrate subscriptions, but also to demonstrate how to test these scenarios.
  • Workflow: Showing some basic workflow patterns

The aim of these examples is to provide concrete application examples that Spring Boot developers can understand and copy. The goal is not to provide simple/hello world examples on how to use the Dapr APIs, as this is already covered in the examples/ directory.

To improve the documentation and guides that target Spring Boot developers, the examples should cover:

  1. PubSub (pubsub directory): move the producer and consumer apps to this directory
  2. Service To Service Invocations (service-to-service): create an example that shows Service to Service invocation integrated with RestTemplate and Microcks for testing
  3. Workflows (workflows): This should include, simple workflow app (simple-workflow), workflow app with PubSub (event-workflow), workflow patterns (patterns), which should include examples from this repository too (https://github.com/diagrid-labs/workflow-patterns-spring-boot) , Spring AI examples related to workflows (spring-ai) , Observability and workflows (observability)

The Spring Boot documentation should be updated to cover the following sections (https://docs.dapr.io/developing-applications/sdks/java/spring-boot/):

On top of this, we should highlight the Spring Boot integration at the top of the Java SDK page: https://docs.dapr.io/developing-applications/sdks/java/, so folks reaching this page can jump straight to Spring Boot instead of looking into the plain Java approach.

Activity

  1. salaboy commented on Sep 10, 2025

    @salaboy
    ContributorAuthor

    @dapr/approvers-java-sdk @dapr/maintainers-java-sdk please add comments/suggestions on what else we should improve for Spring Boot developers.

  2. javier-aliaga commented on Sep 11, 2025

    @javier-aliaga
    Contributor

    I totally agree, but also I would like to reconsider how our tests/examples strategy.

  3. salaboy commented on Sep 11, 2025

    @salaboy
    ContributorAuthor

    @javier-aliaga maybe we need to create a separate proposal for that. I would be happy to move the Spring Boot examples to a separate repo for example.

  4. cicoyle commented on Sep 11, 2025

    @cicoyle
    Contributor

    For this section:

    Workflows (workflows): This should include, simple workflow app (simple-workflow), workflow app with PubSub (event-workflow), workflow patterns (patterns), which should include examples from this repository too (https://github.com/diagrid-labs/workflow-patterns-spring-boot) , Spring AI examples related to workflows (spring-ai) , Observability and workflows (observability)
    

    Clarification question: Do you mean to have the following directories?

    • spring-boot-examples/workflows/simple-workflow
    • spring-boot-examples/workflows/event-workflow
    • spring-boot-examples/workflows/patterns
    • spring-boot-examples/workflows/spring-ai
    • spring-boot-examples/workflows/observability

    I am all for that 🎉


    Re: the docs - We currently have the following:

    Image Image

    Could we tab inwards from SpringBoot Integration on the left pane and have a Getting started section where most of what we have now goes into, then add tabs for pubsub, service invocation, and workflows?

    Meaning something like this:

    Image

    What are your thoughts on that? This would clean up having the springboot integration docs page being a catch all page in the docs and enable users to click it and see how to get started with it and use the respective APIs (pubsub/workflows/etc) from the left pane and keep it a bit cleaner while aligning with the other SDKs where on the left we traditionally have the Dapr APIs.


    re: highlighting the Spring Boot Integration, I agree with you and think we could do something like how the Actors has this indent to highlight other docs:

    Image
    re: reconsider how our tests/examples strategy
    

    I am open to a proposal for this.

  5. salaboy commented on Oct 6, 2025

    @salaboy
    ContributorAuthor

    Based on feedback provided by @msfussell I would recommend the following structure for the docs:

    • Java
      • Overview (https://docs.dapr.io/developing-applications/sdks/java/) explaining the different alternatives (Spring Boot, Quarkus and plain Java). This should be simple and just contain links to the following sections.
      • Getting started for Spring Boot Developers
        • Maven/Gradle dependencies and Dependency Injection
        • Using Tescontainers for local development
        • DaprMessagingTemplate + PubSub Example
        • Dapr Workflows and Spring Boot
          • Basic workflow example
          • Workflow patterns with Spring Boot
          • Multi App Spring Boot example
        • Spring Boot references (blog posts, videos)
        • Other sections (to be created on a second iteration)
      • Getting started for Quarkus Developers (to be created on a second iteration)
      • Getting started for Java Developers
        • "Existing sections under Java today"

    This structure will enable us to expand into different ecosystems and topics, while prioritizing Spring Boot developers.

  6. salaboy commented on Oct 6, 2025

    @salaboy
    ContributorAuthor

    @dapr/maintainers-java-sdk @dapr/approvers-java-sdk please feel free to comment on this, as I am planning to start working on this very soon.

  7. matheusandre1 commented on Oct 29, 2026

    @matheusandre1
    Contributor

    /assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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