spring-webflux Questions

3

In Spring MVC, I had a @UniqueEmail custom hibernate validator (to check for uniqueness of email when signup), which looked as below: public class UniqueEmailValidator implements ConstraintValidat...
Orobanchaceous asked 12/7, 2018 at 8:9

1

I’m looking for a way to find the HTTP version of incoming request in spring webflux netty server I cannot find any method in ServerWebExchange to get this information. Spring servlet has some impl...
Bibby asked 11/3, 2021 at 4:11

1

I'm working on a Spring Boot application that uses Spring WebFlux, and I'm trying to intercept WebClient requests and responses. Specifically, I need to capture both the headers and the request/res...

13

Solved

I want to have centralised logging for requests and responses in my REST API on Spring WebFlux with Kotlin. So far I've tried this approaches @Bean fun apiRouter() = router { (accept(MediaType.AP...
Talie asked 21/7, 2017 at 14:17

7

Solved

I'm trying to find examples of WebClient use. My goal is to use Spring 5 WebClient to query a REST service using https and self signed certificate Any example?

4

Solved

I'm learning Spring WebFlux and during writing a sample application I found a concern related to Reactive types (Mono/Flux) combined with Spring Cache. Consider the following code-snippet (in Kotl...
Dagny asked 8/1, 2018 at 18:53

4

Solved

How to mock a method that returns Mono<Void>? I have this method that returns Mono<Void> public Mono<Void> deleteMethod(Post post) { return statusRepository.delete(post); } ...
Weisbrodt asked 23/7, 2019 at 19:58

2

Solved

In Spring Boot 3, they have changed so that trailing slashes, by default, are no longer ignored. For example, if I have a GET resource, /users, and I navigate to /users/ then Spring Boot webflux wi...
Twombly asked 13/12, 2022 at 12:41

2

I am invoking to a service with the following code: WebClient.create().get() .uri("http://www.somehost.es/api/products/1319/?ws_key=DC63ZTBVVQLN9MHQPQ9UMTL2DSW55C63") .retrieve() .body...
Adriannaadrianne asked 8/11, 2020 at 11:12

2

Quick question regarding Java Spring Webflux WebClient and the wiretap logging please. I am currently using Java with SpringBoot Webflux WebClient 2.5.0 to make outbound http requests (where I am t...
Kessel asked 24/5, 2021 at 10:31

15

Solved

I am using the webclient from spring webflux, like this : WebClient.create() .post() .uri(url) .syncBody(body) .accept(MediaType.APPLICATION_JSON) .headers(headers) .exchange() .flatMap(cli...
Acquiescence asked 16/6, 2017 at 15:34

2

Solved

I want to run a periodic task. In Spring MVC it works flawlessly. Now I want to integrate Spring Webflux + Kotlin Coroutines. How can I call suspended functions in the @Scheduled method? I want it ...

5

Solved

I've created a Java Spring Boot service using the WebFlux reactive module, H2 in-memory database, and R2DBC reactive driver. When I run the service, it fails with an "Unable to create a Connec...
Civic asked 13/5, 2021 at 23:29

7

Solved

I referenced with the blog post Contextual Logging with Reactor Context and MDC but I don't know how to access reactor context in WebFilter. @Component public class RequestIdFilter implements WebF...
Monorail asked 8/8, 2018 at 3:14

11

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, body & status code from Spring 5 ...
Gert asked 7/5, 2018 at 23:46

4

Solved

I have a Spring Boot WebFlux application using Spring Boot 2.0.0.M5/2.0.0.BUILD-SNAPSHOT. I have a requirement to add trace-ids to all logs. In order to get this to work in a WebFlux application,...
Hollyanne asked 24/10, 2017 at 22:11

4

Solved

At https://github.com/spring-projects/spring-framework/blob/master/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt the comment shows how to define Spring Bea...
Marketa asked 29/8, 2017 at 9:51

3

I'm trying to configure spring-webflux WebClient (with reactor netty under the hood) with ssl and client hostname verification. I'm provided with javax.net.ssl.SSLContext, HostnameVerifier and a li...
Granulation asked 26/7, 2018 at 15:5

18

Solved

I want to use Spring Security for JWT authentication. But it comes with default authentication. I am trying to disable it, but the old approach of doing this - disabling it through application.prop...

2

Solved

Mono.delay(Duration.ofMillis(10)).map(d -> { System.out.println(d); return d; }).block(); output : 0 Not able to see any output on console when I am calling with subscribe() or subscribe(-) ...
Jin asked 6/1, 2020 at 5:39

2

Is there a "default" scheduler in the Project Reactor? Which one is it? By "default" I mean the one used when no subscribeOn() nor publishOn() are called for the chain.
Hemelytron asked 19/4, 2022 at 12:52

3

I have a Spring Webflux application where I am trying to load a dependency from an old module (old module is on Spring WebMVC framework). When the application is launched, this error is thrown - ...
Zerline asked 13/8, 2019 at 6:57

2

I'm trying to create a dashboard application where multiple widgets get updates through SSE. My DashboardController looks like: public class DashboardController { private WidgetService widgetServi...
Centerboard asked 11/7, 2022 at 10:14

2

I have this following code which uses WebClient to make HTTP calls. webClient.post() .uri("/users/track") .body(BodyInserters.fromObject(getUserTrackPayload(selection, customAttribute, partyId)...

4

Solved

I am trying to return a 404 when a Flux is empty, similar to here:WebFlux functional: How to detect an empty Flux and return 404? My main concern is that, when you check if the flux has elements i...
Proselyte asked 22/11, 2018 at 16:36

© 2022 - 2024 — McMap. All rights reserved.