Skip to content

Conditions to auto-configure a RestClient are outdated with the modularization #48308

@snicoll

Description

@snicoll

In Spring Boot 3.5, we've relaxed when RestClient is auto-configured. The condition checks if it isn't a reactive environment or if virtual threads are enabled. That makes sure that we don't provide the RestClient infrastructure in a reactive app that's not ready for blocking calls.

The condition is best effort as checking if virtual threads are enabled is not covering all the cases. Besides, modularization in Spring Boot 4 provides a much more stronger signal. To kick in, spring-boot-restclient must be added to the classpath, and that is a better signal than what the current condition does.

We're going to remove this condition and rely on users opting-in for spring-boot-restclient.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions