Member-only story
Spring Boot 4: Deleting Your RestClient Boilerplate Codes
If you have called a REST API from Spring, you know the drill. You build a RestClient, wrap it in an HttpServiceProxyFactory, create a proxy for each interface, and register every proxy as a bean. It works, but the wiring code grows faster than the code that does anything useful. Spring Boot 4 (built on Spring Framework 7, released November 2025) fixes this with an HTTP service registry. You declare your interfaces, point them at a base URL in application.properties, and the framework does the rest.
This post shows the old setup, the new one, and where each piece goes.
The interface has not changed
The declarative HTTP client itself is the same one from Spring Framework 6. You describe the remote API as a plain Java interface with @HttpExchange annotations.
public interface GithubClient {
@GetExchange("/repos/{org}/{repo}/milestones")
List<Milestone> getMilestones(@PathVariable String org, @PathVariable String repo);
@GetExchange("/repos/{org}/{repo}/issues/{number}")
Issue getIssue(@PathVariable String org, @PathVariable String repo, @PathVariable int number);
}jSpring generates the proxy at runtime and turns each method call into an HTTP request. @PathVariable fills the placeholders, @RequestParam…









