Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17400

Improve documentation on reactive types for ResponseEntity

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.10, 5.1.1
    • Fix Version/s: 5.0.11, 5.1.2
    • Component/s: [Documentation], Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      The documentation of Spring WebFlux Contoller Style is not proper and in general give three

      example of using it:

      1. Mono<Pojo> sayHello(){}
      2. Flux<Pojo> sayHello(){}
      3. 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:

      1. ResponseEntity<Flux<Pojo>> sayHello() {}
      2. ResponseEntity<Mono<Pojo>> sayHello() {}
      3. Mono<ResponseEntity<Pojo>> sayHello() {} : May be blocking
      4. 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:

      1. ResponseEntity.publisher(someMono).ok;
      2. 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.

       

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            ankur pathak Ankur Pathak
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 37 weeks ago