Spring Reactive playground
[!NOTE] A huge thanks to @rajadilipkolli for his efforts in updating this repository to the newest Spring Boot v4.
This is a sandbox project for demonstrating Reactive Streams support in the Spring framework and the broader Spring ecosystem.
I've also maintained a series of repositories related to Reactive Streams and the latest Spring 5:
The source codes have been updated to Spring 7 / Spring Boot v4.
Read online: https://hantsy.github.io/spring-reactive-sample/
The following table lists all sample codes available in this repository.
| Name | Description |
|---|---|
| vanilla | Basic spring-webflux features with a main class to start the application |
| vanilla-jetty | Same as vanilla, but uses Jetty as the runtime |
| vanilla-tomcat | Same as vanilla, but uses Tomcat as the runtime |
| vanilla-undertow | Same as vanilla, but uses Undertow as the runtime |
| java8 | Java 8 CompletableFuture and @Async example |
| java9 | Same as vanilla, with Java 9 Flow API support (see SPR-16052) |
| rxjava3 | Same as vanilla, but uses RxJava 3 instead of Reactor (since Spring 5.3.0) |
| smallrye-mutiny | Same as vanilla, but uses SmallRye Mutiny instead of Reactor (since Spring 5.3.10) |
| rxjava3 | Same as vanilla, but use Rxjava3 instead of Reactor, since Spring 5.3.0 |
| smallrye-mutiny | Same as vanilla, but use SmallRye Mutiny instead of Reactor, since Spring 5.3.10 |
| war | Replaces the manual bootstrap with Spring ApplicationInitializer, can be packaged as a war file for external servlet containers |
| routes | Uses RouterFunction instead of @Controller |
| register-bean | Programmatic bean registration in ApplicationContext at bootstrap |
| data-elasticsearch | Spring Data ElasticSearch Reactive example |
| data-neo4j | Spring Data Neo4j reactive example |
| data-mongo | Spring Data Mongo Reactive example |
| data-mongo-pageable | Spring Data Mongo Reactive example with pagination support |
| data-mongo-transaction | Spring Data Mongo Reactive example with Transaction support |
| data-redis | Spring Data Redis Reactive example |
| data-redis-message | Spring Data Redis Reactive example with ReactiveRedisMessageListenerContainer |
| data-cassandra | Spring Data Cassandra Reactive example |
| data-couchbase | Spring Data Couchbase Reactive example |
| security | Adds Spring Security Reactive support to vanilla |
| security-form | Same as security, with login form example |
| security-user-properties | Same as security, but stores users in users.properties |
| security-method | Replaces URI-based configuration with method-level constraints |
| security-data-mongo | Based on data-mongo and security, replaces hard-coded users with Mongo-driven store |
| multipart | Multipart request handling and file uploading |
| multipart-data-mongo | Multipart and file uploading, data stored in Mongo via Spring Data Mongo Reactive GridFsTemplate |
| mvc-thymeleaf | Traditional web application using Thymeleaf as template engine |
| mvc-mustache | Traditional web application using Mustache as template engine |
| mvc-freemarker | Traditional web application using Freemarker as template engine |
| sse | Server Send Event example |
| websocket | WebSocket example |
| web-filter | WebFilter example |
| groovy | Written in Groovy |
| groovy-dsl | Groovy DSL bean definition example |
| client | WebClient example for calling backend reactive APIs |
| client-jetty | WebClient with Jetty Reactive HttpClient |
| client-jdk11-httpclient | WebClient with JDK 11 HttpClient |
| client-apache-httpclient5 | WebClient with Apache HttpClient 5 |
| cache | Cache Async/Reactive support with in-memory ConcurrentHashMap |
| cache-caffeine | Cache Async/Reactive support with Caffeine |
| cache-redis | Cache Async/Reactive support with Redis |
| event | Application Event Reactive example |
| kotlin | Written in Kotlin |
| kotlin-co | Written in Kotlin Coroutines |
| kotlin-routes | Kotlin functional approach to declare beans and bootstrap programmatically |
| kotlin-dsl | Kotlin DSL bean definition example |
| schedule | Spring Schedule Reactive example |
| session | Spring Session example |
| session-header | Spring Session WebSessionIdResolver example |
| session-data-redis | Spring Data Redis based ReactiveSessionRepository example |
| session-data-mongo | Spring Data Mongo based ReactiveSessionRepository example |
| exception-handler | Exception Handler example |
| integration | Spring Integration example |
| integration-dsl | Spring Integration Java 8 DSL example |
| restdocs | Spring RestDocs example |
| Name | Description |
|---|---|
| boot-start | Spring Boot example with 3 Maven profiles to switch between Jetty, Tomcat, and Undertow |
| boot-start-routes | Simple RouterFunction example |
| boot-mvc-thymeleaf | Same as mvc-thymeleaf, based on Spring Boot |
| boot-mvc-mustache | Same as mvc-mustache, based on Spring Boot |
| boot-mvc-freemarker | Same as mvc-freemarker, based on Spring Boot |
| boot-groovy | Written in Groovy |
| boot-kotlin | Written in Kotlin |
| boot-kotlin-co | Written in Kotlin Coroutines |
| boot-kotlin-dsl | Kotlin-specific BeanDefinitionDSL and RouterFunctionDsl example |
| [boot-kotlin-co-dsl](https://github.com/hantsy/spring-reactive-sample/tree/master/boot-kotli |
暂无开放 Issues,或尚未同步最近议题。