@RequestScope
is a specialization of @Scope
for a component whose lifecycle is bound to the current web request. In spring WebFlux the use of this annotation cause a:
No Scope registered for scope name 'request'
It would be nice have the same feature/annotation in WebFlux to bind the life of a component with the current web request. Currently, I don't think it's possible achieve this behaviour in WebFlux in a simple way (like using an annotation).
Comment From: jhoeller
Since there is no technical interaction between the core container Scope
mechanism and the reactive pipelines in WebFlux controllers, we are not able to provide direct support for @RequestScope
. Any such scoped attributes will have to be programmatically added to the reactive pipeline in the controllers instead. If there is anything we can do to make such a programmatic arrangement more convenient, feel free to create a separate issue for it.