Questions tagged [webflux]

101 questions
0
votes
2 answers

Extract Mono nonblocking response and store it in a variable and use it globally

In my project I have a requirement where I need to call a third party api authentic url to get the the access token. I need to set that access token in every subsequent request header .The access token has some lifetime and when the lifetime expired…
stumbler
  • 647
  • 3
  • 11
  • 26
0
votes
0 answers

Springboot WebFlux File Upload

I am trying to upload file to SpringBoot webflux controller. The controller must save the file and record the file informations (filesize, name, user, and path) in the db. @PostMapping(value="upload/single", consumes =…
Saran
  • 21
  • 2
  • 5
0
votes
1 answer

How to combine a WebFlux WebClient DataBuffer download with more actions

I am trying to download a file (or multiple files), based on the result of a previous webrequest. After downloading the file I need to send the previous Mono result (dossier and obj) and the file to another system. So far I have been working with…
Nischo
  • 454
  • 6
  • 20
0
votes
1 answer

Getting error while configuring Swagger-ui with spring reactive

While integrating swagger-ui with a reactive spring project generated using JHipster 7.1.0 for Java 11. I added the below dependencies. The application has below dependencies of swagger POM dependencies
Varad
  • 920
  • 10
  • 25
0
votes
1 answer

@Value for resource not working in Webflux

I have a Spring Boot Webflux app with: @Value("classpath:file.json") private Resource create; The file is in resources/file.json, but create is always coming up null in the debugger. I have also tried: new ClassPathLoader("file.json") through…
SledgeHammer
  • 7,338
  • 6
  • 41
  • 86
0
votes
1 answer

Spring webflux not running reactive call

I have the following methods. @Transactional public Mono processPollResult(final PollReport pollReport, final String xmlResult, final String ref, final String clientId, int orgId) { return…
user1578872
  • 7,808
  • 29
  • 108
  • 206
0
votes
1 answer

Disable CSRF for specific URLs SPA Spring Gateway WebFlux

I have next CSRF code in WebFilterChain: .csrfTokenRepository(CookieServerCsrfTokenRepository.withHttpOnlyFalse()) .requireCsrfProtectionMatcher(getURLsForDisabledCSRF()) I would like to turn off the CSRF check on POST…
0
votes
0 answers

Spring webclient to make it generic for HTTP methods

I am working on webclient for various HTTP methods (GET,PATCH,POST,DELETE). These are created separately and invoke separately. I am looking to make it as a generic webclient component so minimum changes needs to do in the future. Below is the code…
0
votes
0 answers

How can i consume a Flux with WebClient

I have this controller : @GetMapping(value = "/stream") public Flux stream() { ... return webClient.get().uri(builder.buildAndExpand(parametres).toUriString()) …
Samshay
  • 123
  • 1
  • 2
  • 10
0
votes
2 answers

Convert Webflux API stream response to List
I am very new to reactive programming. I am consuming a webflux API which is returning stream response ( application/stream+json ). My task is to call the API and convert response to List. My code snippet for calling API ClientResponse res = …
ysn
  • 145
  • 2
  • 13
0
votes
2 answers

WebClient exchangeToMono retrieving empty body

When using WebClient's exchangeToMono() the body retrieving part is always returning an empty Mono: Example, the exposed service which returns a non-empty Mono @PostMapping("/test") public Mono getCalled(@RequestBody Pojo pojo) { …
Fradantim
  • 31
  • 1
  • 6
0
votes
0 answers

How to get data between start date and enddate

This is the query: " select dbo from EmpWorkDiaryEntriesDBO dbo" + "lef join fetch dbo.empWorkDiaryEntriesDetailsDBOSet dbos" + "where dbo.recordStatus='A' and dbo.erpWorkEntryDate between…
0
votes
1 answer

not streaming response in Spring WebFlux Flux

@GetMapping(value = "/download") public Flux flux(ServerHttpResponse response) throws IOException { final Stream stream = Stream.iterate(1, i -> i + 1).limit(1000); String fileName =…
gisulee
  • 47
  • 4
0
votes
1 answer

Does it make sense to use completableFuture together with CRUD when working with WebFlux?

I'm just starting to learn webFlux.I'm just starting to learn webplus and I'm interested in question.If it makes sense to use completableFuture together with CRUD operations? That is , let 's say i have…
Omegon
  • 387
  • 2
  • 10
0
votes
1 answer

How to save an element with WebFlux and ReactiveMongoRepository?

I want to write the first program webFlux and ReactiveMongoRepository. i have repository: @Repository public interface personRepository extends ReactiveMongoRepository { Mono save(Person person); } my…
Omegon
  • 387
  • 2
  • 10