{"id":28963690,"url":"https://github.com/fresult/learn-spring-webflux-3.0","last_synced_at":"2026-05-04T12:32:45.900Z","repository":{"id":291357902,"uuid":"975729805","full_name":"fResult/Learn-Spring-Webflux-3.0","owner":"fResult","description":"Spring Webflux 3.0 Kotlin/Java","archived":false,"fork":false,"pushed_at":"2025-06-21T13:50:00.000Z","size":265,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T14:38:33.650Z","etag":null,"topics":["java","kotlin","spring-boot","spring-boot-3","webflux"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fResult.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-30T19:56:54.000Z","updated_at":"2025-06-15T11:07:36.000Z","dependencies_parsed_at":"2025-06-21T14:31:04.472Z","dependency_job_id":"d290e68c-ff9d-44d9-aaf8-1a452ef8803d","html_url":"https://github.com/fResult/Learn-Spring-Webflux-3.0","commit_stats":null,"previous_names":["fresult/learn-spring-webflux-3.0"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fResult/Learn-Spring-Webflux-3.0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2FLearn-Spring-Webflux-3.0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2FLearn-Spring-Webflux-3.0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2FLearn-Spring-Webflux-3.0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2FLearn-Spring-Webflux-3.0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fResult","download_url":"https://codeload.github.com/fResult/Learn-Spring-Webflux-3.0/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fResult%2FLearn-Spring-Webflux-3.0/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601534,"owners_count":23183099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","kotlin","spring-boot","spring-boot-3","webflux"],"created_at":"2025-06-24T04:12:13.895Z","updated_at":"2026-05-04T12:32:45.895Z","avatar_url":"https://github.com/fResult.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Spring Webflux 3.0\n\n\u003ca href=\"https://leanpub.com/reactive-spring\"\u003e\u003cimg src=\"https://d2sofvawe08yqg.cloudfront.net/reactive-spring/s_hero?1620596567\" alt=\"\" height=\"350px\" align=\"right\"\u003e\u003c/a\u003e\n\nThis repository contains my hands-on exercises while learning Spring WebFlux 3.0 following the [Reactive Spring](https://leanpub.com/reactive-spring) book and [these repositories](https://github.com/Reactive-Spring-Book).\n\n## Prerequisites\n\n- JDK 24 (for Java implementations)\n- JDK 23 (for Kotlin implementations)\n- Gradle 8.14\n\n## Project Structure\n\nThe project is organized into modules demonstrating different aspects of Spring WebFlux:\n\nEach module is implemented in both [Java](./java) and [Kotlin](./kotlin) to compare approaches.\n\n- `03-bootstrap`: Implementation of core Spring concepts including dependency injection, configuration, application context, and transaction management fundamental\n   - [Java Implementation](./java/03-bootstrap)\n   - [Kotlin Implementation](./kotlin/03-bootstrap)\n- `04-input-and-output`: xxxxxxxxxxxxxxxxx\n   - [Java Implementation](./java/04-input-and-output)\n   - [Kotlin Implementation](https://github.com/fResult/Learn-Spring-Webflux-3.0/tree/04_input-and-output/kotlin/04-input-and-output)\n- `05-reactor`: Implementation of reactive programming concepts using Project Reactor with Mono/Flux operators, error handling, backpressure management and testing strategies\n   - [Java Implementation](./java/05-reactor)\n   - [Kotlin Implementation](./kotlin/05-reactor)\n- `06-data-access`: Implementation of reactive database access using Spring Data R2DBC with schema definitions, repository patterns, and transaction management\n   - Java Implementation (No implementation)\n   - [Kotlin Implementation](./kotlin/06-data-access)\n- `07-http`: Implementation of reactive HTTP applications featuring WebClient for clients, WebFlux for servers, security integration, and comparison with servlet-based approaches\n   - Java Implementation (No implementation)\n   - [Kotlin Implementation](./kotlin/07-http)\n- `08-rsocket`: Implementation of RSocket protocol for reactive messaging with setup, request-response, fire-and-forget, and streaming interactions\n   - Java Implementation (No implementation)\n   - [Kotlin Implementation](./kotlin/08-rsocket)\n- `09-service-orchestration`: Implementation of service discovery and registration using Spring Cloud Netflix Eureka for microservices coordination\n   - Java Implementation (No implementation)\n   - [Kotlin Implementation](./kotlin/09-service-orchestration)\n\n## My Summary\n\n### What I Learned From Reading This Book\n\n- **Spring Boot fundamentals**: Appreciated how Spring Boot speeds up development through starter packages, auto-configuration, and easy transaction management\n- **Non-blocking I/O**: Understood the benefits of non-blocking I/O for scalable applications\n- **Reactive programming principles**: Understood reactive programming principles and how they differ from imperative programming\n- **Project Reactor**: Mastered Project Reactor's core (`Mono` and `Flux`) and how they enable composition of asynchronous operations\n- **Reactive database access**: Learned reactive database access patterns with Spring Data R2DBC replacing traditional JDBC\n- **Spring MVC vs WebFlux**: Explored the differences between traditional Spring MVC and reactive Spring WebFlux for building web applications\n- **RSocket protocol**: Discovered RSocket as a binary protocol alternative to HTTP for reactive communication patterns\n- **Service Orchestration Patterns**:\n  - **Hedging pattern**: Racing multiple service instances with different latencies to reduce tail latency\n  - **Scatter-Gather pattern**: Aggregating data from multiple microservices (Customer, Profile, Order) into single response\n  - **Resilience4j integration**: Circuit Breaker, Retry, Rate Limiter, and Bulkhead patterns for fault tolerance\n  - **Service Discovery**: Using Eureka server for dynamic service registration and discovery\n  - **Load balancing**: Running multiple instances with random ports (`server.port: 0`) for horizontal scaling\n  - **Gateways**: Routing requests through API Gateway to backend services\n\n### Things I Did Different and Learned Further\n\n- Used Gradle Kotlin DSL instead of Maven for build configuration\n- Implemented parallel Kotlin versions of Java examples\n- Updated to Spring Boot 3.5.x while the book uses an older Spring Boot version 2.5.0\n- Adopted a monorepo approach with [Gradle Multi-project Builds][gradle-multiproject] and [Gradle Composite Builds][gradle-composite-builds] to manage both Java and Kotlin implementations in a single repository\n    - Learned that Gradle Kotlin DSL supports both type-safe and string-based dependency declarations, and that the string-based form was required\n        in [`08:rsocket/build.gradle.kts`](./kotlin/08-rsocket/build.gradle.kts) when adding dependencies inside `afterEvaluate`\n    - Learned that some plugins (e.g., `spring-boot`, `dependency-management`) must be applied with `apply(false)` in the root and then enabled in subprojects, since they cannot be declared directly like `kotlin(\"jvm\")`.\n- Implemented database profile switching between R2DBC, MongoDB, and other providers\n- Implemented reactive global error handling in [`ExceptionProblemResponseMapper#map`](https://github.com/fResult/Learn-Spring-Webflux-3.0/blob/72805b595fe7e3b692d7ccce6d78d2611b40abd3/kotlin/07-http/webflux/src/main/kotlin/com/fResult/common/ExceptionProblemResponseMapper.kt#L13-L21)\n    (utilized in [`ErrorHandlingRouteConfiguration`](https://github.com/fResult/Learn-Spring-Webflux-3.0/blob/72805b5/kotlin/07-http/webflux/src/main/kotlin/com/fResult/http/filters/ErrorHandlingRouteConfiguration.kt#L18) class).\n- Learned to properly configure Spring Cloud dependencies in Gradle version catalogs by declaring libraries in the `[libraries]` section rather than just versions, enabling correct dependency resolution through the BOM (Bill of Materials)\n- Learned that Spring Cloud dependencies must be declared as libraries in `libs.versions.toml`, not just as versions, for proper Gradle catalog resolution\n\n\u003c!-- References --\u003e\n[gradle-multiproject]: https://docs.gradle.org/current/userguide/intro_multi_project_builds.html\n[gradle-composite-builds]: https://docs.gradle.org/current/userguide/composite_builds.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresult%2Flearn-spring-webflux-3.0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffresult%2Flearn-spring-webflux-3.0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffresult%2Flearn-spring-webflux-3.0/lists"}