Questions tagged [spring-webflux]

Spring Framework 5 includes a new spring-webflux module. The module contains support for reactive HTTP and WebSocket clients as well as for reactive server web applications including REST, HTML browser, and WebSocket style interactions. WebFlux can run on Servlet containers with support for the Servlet 3.1 non-blocking I/O API as well as on other async runtimes such as Netty and Undertow.

Questions tagged spring-webflux should be about applications using the Spring WebFlux framework.

If Spring Boot is involved, please also tag the question with spring-boot. If the question is related to the use of Reactor operators, please tag the question with project-reactor as well.

For Spring WebFlux related documentation, please refer to the:

6050 questions
2
votes
0 answers

Why does spring-boot-starter-webflux import spring-web?

in my pom.xml I replaced this dependency: org.springframework.boot spring-boot-starter-web by
maxxyme
  • 2,164
  • 5
  • 31
  • 48
2
votes
1 answer

Spring Boot Couchbase Reactive isn't supporting Pagination

I'm trying to implement Pagination in my Reactive WebFlux app and my DB is Couchbase. The Spring Data Couchbase doc allows me to pass Pageable as an argument in my Repository. Flux findByFirstnameOrderByLastname(String firstname, Pageable…
2
votes
0 answers

WebFlux: does Flux.reduce() propagate Mono.error()?

Java 11 Spring Boot 2.2.6 WebFlux Netty application using Flux.parallell streams on WebClient REST call: private Mono sendDocument(Document doc) { return documentWebClient .post() .uri("/upload") …
mattobob
  • 833
  • 4
  • 15
  • 37
2
votes
1 answer

Spring WebFlux: How to return a file as byte array from DB

Just started leaning Spring Reactive, and I couldn't find any examples on how to do something as simple as this. Without WebFlux, My controller was looking like this: @GetMapping("/retrieveAttachment/{id}") public ResponseEntity
Drunken Daddy
  • 7,326
  • 14
  • 70
  • 104
2
votes
1 answer

Spring Reactive Web - Exceptions are always wrapped in 500

With a very simple project, error handling is unclear. public class WebfluxApplication { public static void main(String[] args) { SpringApplication.run(WebfluxApplication.class, args); } } public class…
StevenPG
  • 311
  • 4
  • 16
2
votes
0 answers

How to combine two files into an archive file in Reactor framework?

Suppose we have several Publishers, each streaming contents of a separate file. How to combine them into a single Publisher, streaming a ZIP archive containing all those files. For simplicity, let's use two basic files having names "FileA.txt",…
diziaq
  • 6,881
  • 16
  • 54
  • 96
2
votes
1 answer

Why pass Mono from handler function in webflux router and not Flux

I am new to Spring. I was trying to make a sample application for spring webflux in functional way. Why can't our handler function pass Flux. is there any way to make router function accept it as it is said that router function accept a subtype of…
Sonal Gupta
  • 31
  • 1
  • 5
2
votes
0 answers

Dynamic Merge of Infinite Reactor streams

Usecase: There is a module which Listens for events in synchronous mode. In the same module using the EmitterProccessor, the event is converted to Flux and made as infinite stream of events. Now there is a upstream module which can subscribes for…
Karthik Prasad
  • 9,662
  • 10
  • 64
  • 112
2
votes
4 answers

Spring Webflux returns 404 ( Not Foud )

I have to save some values in a reactive way using spring Webflux. But when I send the request then 404 status is returned as a response. pom.xml org.springframework.boot
Nafaz M N M
  • 1,558
  • 2
  • 27
  • 41
2
votes
0 answers

HashMap with Flux in Reactive Programming

I have to convert the following code into the non-blocking(asynchronous) process. EmpController class @RestController @RequestMapping("/emp") public class EmpController { private EmployeeRepository empRepo; @Autowired public…
Nafaz M N M
  • 1,558
  • 2
  • 27
  • 41
2
votes
1 answer

Why doesn't Spring WebFlux MockServerRequest allow an empty body?

I'm writing some tests for a Spring WebFlux application and I'm trying to mock a scenario where a request doesn't have a body. I reached for the built-in MockServerRequest, figuring I'd use the built-in mock over making my own. It does allow…
Stephen Cohen
  • 370
  • 1
  • 2
  • 12
2
votes
0 answers

Spring WebFlux file upload performance issues

I've created two sample applications for testing file upload, one with MVC and one with WebFlux (Spring Boot 2.4.0-M2 because they have implemented zero-copy non-blocking transferTo in that version). I did not configure anything on the servers…
Peter
  • 323
  • 1
  • 16
  • 46
2
votes
1 answer

How to receive a Map from an endpoint using Spring WebClient get?

How can I receive a Map from an endpoint web service using WebClient in Spring Boot? Here is my try: (it gives syntax error: Incompatible equality constraint: Map and Map). How can I fix it? public Flux
Khaled
  • 345
  • 5
  • 14
2
votes
1 answer

ReactiveRedisTemplate opsForHash put doesn't overwrite the value

ReactiveRedisTemplate opsForHash put doesn't overwrite the value. redisTemplate.opsForHash().put("NAMESPACE", id, personInfo.toByteArray()). map(resBoolean -> { return resBoolean; …
2
votes
1 answer

Spring Security multiple calls to different OAuth servers requiring multiple tokens in SecurityContext

I have a spring application that verifies a JWT token on the rest endpoint. Using SecurityChain .oAuth2ResourceServer() .jwt() This seems to create a JwtAuthenticationToken in the ReactiveSecurityContextHolder. I then want to flow the input from…
perkss
  • 1,037
  • 1
  • 11
  • 37
1 2 3
99
100