Chapter 6: Dynamic Rendering

  1. How does the SpringWebFlux framework resolve a View?

The framework invokes ViewResolutionResultHandler using the HandlerResult returned for the endpoint invocation. ViewResolutionResultHandler then determines the correct view by validating the returned value for the following:

  • String: If the returned value is a string, then the framework builds a view using the configured ViewResolvers
  • Void: If nothing is returned, it then tries to build the default view
  • Map: The framework looks for the default view but it also adds the key values returned into the request model

ViewResolutionResultHandler looks up the content type passed in the request. In order to determine which view should be used, it compares the content ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.