-
Notifications
You must be signed in to change notification settings - Fork 223
Description
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:
- PubSub (
pubsub
directory): move the producer and consumer apps to this directory - Service To Service Invocations (
service-to-service
): create an example that shows Service to Service invocation integrated with RestTemplate and Microcks for testing - 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/):
- Basics, dependencies, injection, basic information about using Dapr and testing with Testcontainers
- PubSub section, which includes the description of the refactored PubSub example (https://docs.dapr.io/developing-applications/sdks/java/spring-boot/#using-spring-messaging-for-producing-and-consuming-events)
- Service to Service Invocation, to cover a newly created example
- Workflows section (https://docs.dapr.io/developing-applications/sdks/java/spring-boot/#using-dapr-workflows-with-spring-boot) expanded with patterns, examples, Spring AI and observability
- Reference links to presentations and online resources
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.