Using WebClient synchronously in Spring Web MVC stack
Is it a good idea to call the WebClient block() operation!?
Published in
4 min readOct 19, 2023
WebClient
was introduced in Spring Framework 5, and the goal was to replace it with RestTemplate
(Spring’s RestTemplate, which is now in maintenance mode).
In this story, we want to answer these questions: Can WebClient be used in a Spring Project that uses the Web MVC stack? If so, how? and what are the consequences when we block the WebClient to get the result? And finally, what is the best configuration in this…