Description
Ankur Pathak opened SPR-17400 and commented
The documentation of Spring WebFlux Contoller Style is not proper and in general give three
example of using it:
- Mono<Pojo> sayHello(){}
- Flux<Pojo> sayHello(){}
- ResponeEntity<?> sayHello(){}
But what if I have Flux and Mono and I have custom headers to set, then what I have to do
no comment on that. I have seen many example on internet no one sure on that abd doing
the things as per their wish for example:
- ResponseEntity<Flux<Pojo>> sayHello() {}
- ResponseEntity<Mono<Pojo>> sayHello() {}
- Mono<ResponseEntity<Pojo>> sayHello() {} : May be blocking
- Mono<ResponseEntity<List<Pojo>> sayHello() {} Its Blocking
What is the correct way of doing it?? Please improve the documentation to cover these cases.
Or Provide the Support for Mono And Flux in ResponseEntity itself like:
- ResponseEntity.publisher(someMono).ok;
- ResponseEntity.publisher(someFlux).noResponse();
Its a blocker in migrating projects in Spring MVC to Spring Flux. Till the time documentation
or support improvement is done, Please provide the correct solution in current situation.
All these cases are properly covered for functional style and should be properly covered for
controller style as well.
Affects: 5.0.10, 5.1.1
Referenced from: commits 2eae37d, d492d7b
Backported to: 5.0.11