I'm trying to upgrade a legacy application to spring boot 3 and RestTemplate is used extesibly.
As far as I know Spring Boot 3 doesn't allow blocking code (at least by default) and I was wondering if this behavior could be changed or the only solution is to ditch RestTemplate and reimplement everything with WebClient?
So far I replaced a call that used rest template to use WebClient instead, but I couldn't find any answers to my question on the web
Edit:
This error is what led me to believe that RestTemplate was not compatible with Spring Boot 3 (the code the caused this exception worked fine before the upgrade).
java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:83) ~[reactor-core-3.4.3.jar:3.4.3]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Is it possible that by upgrading to Spring Boot 3 jetty/undertow was picked instead of tomcat?