Spring Boot, Spring Cloud and Reactor for C# developers — Mission
Sections
Reading settings
No voice for this language in this browser.
More voices
Code and English terms
Off: the page’s voice reads everything, with no pause between two voices.
No voice for this language in this browser.
More voices
More voices: Microsoft Edge has natural online voices, and Windows (Settings › Time & language › Speech), macOS and Android install others.
Why I’m learning this
Section titled “Why I’m learning this”The Java course taught me the language. The Java code I actually meet, though, is rarely plain Java: it is a Spring Boot service, often a reactive one, behind a Spring Cloud gateway. Its annotations do the work that Program.cs does explicitly in ASP.NET Core, and its Mono and Flux look like Task and IAsyncEnumerable without behaving like them.
I want to read and write those services with the same confidence as an ASP.NET Core application: know where each bean comes from, predict on which thread a pipeline runs, and tell a real design choice from a habit.
Who this course is for
Section titled “Who this course is for”You are an experienced C# developer. You know ASP.NET Core, its dependency injection, IOptions, IHostedService, health checks, HttpClient, IAsyncEnumerable, and probably Polly and YARP. You have followed Java for C# developers, or you are comfortable with Java 25, Maven and JUnit. This course sends you back to that course’s lessons instead of repeating them: lesson 9 for virtual threads, lesson 10 for Maven, lesson 11 for JUnit, Mockito and BlockHound.
The running example
Section titled “The running example”The lessons build small services around music theory: a scales service that returns the notes and chords of a mode, a progression stream, a chord chart client. The domain is a plain Java module, music, with no Spring and no Reactor in it. By the end of the course, the pieces fit together like this:
flowchart LR client[Browser or HTTP client] --> gateway[Spring Cloud Gateway] gateway --> scales["Scales service (WebFlux)"] gateway --> progressions["Progressions service (server-sent events)"] progressions -->|WebClient| scales scales --> db[(R2DBC database)] config[Config server] -.-> scales config -.-> progressions progressions -->|Spring Cloud Stream| broker[[Message broker]]Lessons 1 to 4 build the first two boxes on the right; the later lessons add the others. Everything runs on localhost, started by the tests, without Docker.
By the end of this course, I will be able to
Section titled “By the end of this course, I will be able to”- create a Spring Boot application and explain where each of its beans, properties and endpoints comes from;
- map ASP.NET Core’s dependency injection, configuration, options and health checks onto Spring’s;
- write, test and debug Reactor pipelines, and say on which thread each step runs;
- choose between Spring MVC on virtual threads and WebFlux for a given service;
- build reactive HTTP APIs and clients with WebFlux and
WebClient; - put a gateway, centralised configuration, service discovery and resilience in front of those services with Spring Cloud;
- observe and test a set of Spring services the way I would a set of ASP.NET Core services.
Outline
Section titled “Outline”| # | Lesson | You already know |
|---|---|---|
| 1 | Spring Boot seen from ASP.NET Core | Program.cs, IServiceCollection, appsettings.json, IOptions, health checks |
| 2 | Reactor: Mono and Flux |
Task, IAsyncEnumerable, LINQ, Rx.NET |
| 3 | Reactor under the hood | the thread pool, ConfigureAwait, channels, Polly, AsyncLocal |
| 4 | WebFlux | minimal APIs, HttpClient, server-sent events |
| 5 | Reactive data access with R2DBC and Spring Data | Entity Framework Core, IAsyncEnumerable from a DbContext |
| 6 | Spring Cloud Gateway | YARP |
| 7 | Centralised configuration with Spring Cloud Config | configuration providers, Azure App Configuration |
| 8 | Service discovery and client-side load balancing | .NET Aspire service discovery, IHttpClientFactory |
| 9 | Resilience with Resilience4j and Spring Cloud Circuit Breaker | Polly, Microsoft.Extensions.Http.Resilience |
| 10 | Messaging with Spring Cloud Stream | MassTransit, Azure Service Bus clients |
| 11 | Observability with Micrometer | OpenTelemetry for .NET, dotnet-counters |
| 12 | Testing a set of Spring services | WebApplicationFactory, integration tests |
Journal: what I tried, what surprised me, what I still need to verify.
Resources
Section titled “Resources”- Spring Boot reference documentation and the Spring Boot 4.0 migration guide
- Spring Framework reference: the IoC container, Web MVC and WebFlux
- Reactor 3 reference guide and the
FluxJavadoc, whose marble diagrams are worth reading - Spring Cloud: release trains and projects
- Reactive Streams specification, the four interfaces underneath Reactor
- On the .NET side: ASP.NET Core fundamentals, Reactive Extensions for .NET