Environment

  • Spring Boot 4.0.0 (main branch)
  • JDK 24 (also reproduces on JDK 21)

Summary

In a WebFlux application, REST_CLIENT-based HTTP Service clients are filtered out even when virtual threads are enabled (no bean, no spring.http.serviceclient.* properties applied) because HttpServiceClientAutoConfiguration is guarded only by NotReactiveWebApplicationCondition. The condition skips all reactive apps, so the virtual-threads path never runs (it would also skip when virtual threads are disabled).

Steps to reproduce

  1. Set spring.http.serviceclient.echo.base-url=https://example.com.
  2. Use WebFlux, add @ImportHttpServices(clientType = ClientType.REST_CLIENT, group = "echo").
  3. Set spring.threads.virtual.enabled=true and ensure the default applicationTaskExecutor exists.
  4. Observe the REST_CLIENT HTTP Service is not auto-configured (base URL not applied; bean missing or defaults).

Expected behavior

spring.http.serviceclient.* properties (base URL, headers, etc.) should apply in reactive apps when virtual threads are enabled.

Actual behavior

The auto-configuration is filtered out by the reactive condition, so properties are not applied in reactive + VT.

Suspected cause

HttpServiceClientAutoConfiguration depends solely on NotReactiveWebApplicationCondition, which excludes reactive apps. The RestClient side already has NotReactiveWebApplicationOrVirtualThreadsExecutorEnabledCondition, but it is package-private and not reused here, so the virtual-threads path is missed.

Notes

  • Added regression test: WebFlux + spring.threads.virtual.enabled=true + @ImportHttpServices currently fails on the main branch.
  • Verification: :module:spring-boot-restclient:check and checkFormatMain passed on JDK 24.

Comment From: wilkinsona

Thanks. We don't need an issue and a PR for the same change so I'll close this in favor of #48274.