Category "spring-webflux"

Spring Webflux and non-blocking logging with log4j2

It is well known fact we should not block in a Spring Webflux applications. In the SpringOne conferences (2020 and 2020), as well as other conferences, several

Would delayElement be susceptible to a DoS attack?

I have a service that authenticates a user and I put delayElement for 2 seconds when it is about to return a 401. When I run through artillery, it seems to star

Extract WebClient GET response values within a Spring Cloud Gateway filter

My end goal with this is to implement a way to make composite API calls within the body of a gateway route filter. I have a very basic demo application running

How do I prevent RSocket from allowing cross origin in Spring Boot?

My Problem I have a spring boot application that uses RSockets. My spring boot app is running on port 8080, and my front-end (React.js) is running on port 3000.

Get body as raw string from ServerWebExchange/ServerHttpRequest

I need to get the request body as a raw JSON string in my controller. I'm using Spring WebFlux. If I could change @PostMapper function signature, it will be so

Spring Reactor onErrorContinue not working

As per documentation I am expecting onErrorContinue will ignore the error element and continue the sequence. Below test case is failing with exception java.lan

Understanding Mono.when

I'm new to Spring WebFlux and do not fully understand the Mono.when(). The following code does not work as expected: List<Mono<Void>> results= ....;

Global exception handling in spring webflux during tests

I'm developing a service with spring webflux. I implemented exception handling using @ControllerAdvice. It works pretty well, but when I run integration tests i

Check user role in Thymeleaf using Webflux security

I have a Spring Security 5 Reactive Applications using the "@EnableWebFluxSecurity" annotation.For my frontend I am using Thymeleaf.Now I have the problem that

Cookie Management For Webflux WebClient

I have a WebClient that sends a JSON object with login credentials to a remote server. The remote server then returns the cookie. After which I need to POST dat

Cookie Management For Webflux WebClient

I have a WebClient that sends a JSON object with login credentials to a remote server. The remote server then returns the cookie. After which I need to POST dat

Firebase ApiFuture to CompletableFuture in a reactive stack

I am using the Firebase Admin Java SDK in a server side Spring WebFlux environment. The Firebase SDK provides two methods for each operation. A synchronous ".do

spring-could-gateway: reactor.netty.channel.AbortedException: Connection has been closed BEFORE send operation

I am getting the following exception in the spring gateway. This exception appears when I have configured Redis Sentinel in the gateway, it throughs exception a

Jave webflux process a String-response with id's

I've a reactive API which receives the following String (image below). I want to process these ID's and perform a search query to my MongoDB and return a Flux w

Spring webflux - ServerWebExchangeDecorator code is not executed when an exception is thrown

I have a Webflux application, where I have a ServerWebExchangeDecorator that decorates the request and responses. I have overrides to do some logging and then c

How to extract response header & status code from Spring 5 WebClient ClientResponse

I am new to Spring Reactive framework & trying to convert Springboot 1.5.x code into Springboot 2.0. I need to return response header after some filtering,

404 error with swagger-ui and spring webflux

I am developping REST services with Spring Webflux and I want to produce documentation with Swagger2 for my API with. I discovered that Webflux is only supporte

Convert ClientResponse to ServerResponse

I'm trying to write a sort of proxy between a REST-Server and a calling client application, in order to enforce privacy by adding attributes to the REST call.

Reactor Mono, how to synch process (using .map()) and return Mono<void> from response.setComplete()

I have this method which gets redirection url and then redirect to that url private Mono<Void> redirectToUrl(ServerHttpResponse response, String status

Cascade Flux results

I have two actions in Mono, both returning similar object - Mono action1() Mono action2() I tried doing - Flux1.blockFirst(); Flux2.blockFirst(); both of the fl