What Is the Role of WebSocketHandler in Spring WebFlux?
Learn how the reactive WebSocketHandler interface processes WebSocket sessions in Spring WebFlux, with echo, broadcast, error handling and security tips.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Learn how the reactive WebSocketHandler interface processes WebSocket sessions in Spring WebFlux, with echo, broadcast, error handling and security tips.
Learn how to add reactive WebSocket endpoints to Spring WebFlux with WebSocketHandler, URL mapping, broadcasting through a sink, and a WebSocketClient.
CorsConfiguration is Spring's holder for CORS rules such as allowed origins, methods and credentials. Learn to apply it in MVC, Spring Security and WebFlux.
Configure CORS in a reactive Spring app with @CrossOrigin, a global CorsRegistry or CorsWebFilter, and enable it in Spring Security for preflight requests.
It adds Spring Security to Spring Boot with secure defaults: authenticated endpoints, CSRF protection and a generated user, all replaceable with your own configuration.
Configure reactive authentication and authorization with SecurityWebFilterChain, ReactiveUserDetailsService and JWT, without blocking the event loop.
RouterFunction routes incoming requests to handler functions using predicates. See the builder, nesting, filters and how it compares to controllers.
Build reusable custom operators for Flux and Mono in Spring WebFlux using transform, transformDeferred, handle and defer, plus StepVerifier tests.
@EnableReactiveMongoRepositories activates non-blocking MongoDB repositories returning Mono and Flux. Learn setup, attributes and Boot defaults.
Extend ReactiveCrudRepository, pick MongoDB or R2DBC as the store and return Mono and Flux. This covers entities, queries, transactions and common pitfalls.
In Spring WebFlux, @Controller defines a web controller whose handlers return Mono and Flux and run non-blocking. See examples, pitfalls and how it differs from MVC.
WebClient is the reactive, non-blocking HTTP client in Spring WebFlux. See how to create it, send requests, stream responses and add timeouts and retries.
Spring WebFlux relies on Reactor demand signalling. Learn how to bound buffers, cap concurrency and choose overflow strategies for sources that ignore demand.
Mono emits zero or one item and Flux emits many. Learn how they work, how backpressure applies and when reactive code is worth using.
Build non-blocking REST endpoints in Spring WebFlux using Mono, Flux, annotated controllers and functional routes, with streaming and error handling.
The spring-boot-starter-webflux dependency adds Spring WebFlux, Project Reactor and Netty so you can build non-blocking, reactive web applications and clients.
Build a non-blocking Spring WebFlux service with Mono and Flux controllers, RouterFunction routes and WebClient, and learn when MVC with virtual threads is better.
@Query lets a Spring Data MongoDB repository method run a hand-written JSON filter with placeholders, projection, sort, count and delete options.
MongoTemplate is the foundation of Spring Data MongoDB: it maps objects, runs queries, partial updates, aggregations and index operations. See examples and comparisons.
Run MongoDB aggregation pipelines from Spring Boot using MongoTemplate, TypedAggregation and @Aggregation repository methods, with record results.