who calls subscribe on Flux or Mono in reactive webapplication

前端 未结 2 523
死守一世寂寞
死守一世寂寞 2020-12-20 17:02

I am looking at some examples of reactive web applications and i am seeing them like this

@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)
@Res         


        
2条回答
  •  天涯浪人
    2020-12-20 17:55

    Mono and Flux concepts exist only within your application, while HTTP protocol is used to communicate between your postman/chrome app and your application.
    Internal classes of the Spring Webflux framework subscribe to Mono and Flux instances returned by your controller methods and map them to HTTP packets based on the MediaType that you specified in RequestMapping.

提交回复
热议问题