My example project: https://github.com/hantsy/spring6-sandbox/tree/master/boot-http-service
- Java 21
- Spring Boot 3.5.0
- WebFlux Stack
Reproducing Steps:
- run
mvn clean compile -DskipTestsin the project root folder. - run
mvn spring-boot:runin server and client folder respectively.
You will see an exception like the following in the client console.
org.springframework.web.reactive.function.client.WebClientRequestException:
executor not accepting a task
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:137) ~[spring-webflux-6.2.7.jar:6.2.7]
If I remove the spring.main.web-application-type line in the client application.properties and set up the server.port=8888, and rerun the application, the .defaultStatusHandler will raise WebClientRespoonseException.$NotFound as expected.
But the WebClient should work in a none-web application as expected.