Skip to content

Evaluate and Migrate from RestTemplate to RestClient/WebClient/Apache HttpClient #261

@katharinabassler

Description

@katharinabassler

What?
Evaluate and migrate the current usage of the soon to be deprecated RestTemplate to a modern HTTP client solution. The main candidates are:

  • Spring’s RestClient (new in Spring 6, recommended for imperative code)
  • Spring’s WebClient (reactive, non-blocking, recommended for reactive applications)
  • Apache HttpClient (mature, widely used, flexible for custom use cases)

Why?

  • Deprecation: RestTemplate will be deprecated or removed in future Spring versions. Migrating now avoids technical debt and ensures compatibility with upcoming Spring releases.
  • Modern Features: RestClient and WebClient offer fluent APIs, better error handling, and improved integration with the Spring ecosystem. WebClient is especially suited for reactive applications (already used in the GUI).
  • Flexibility: Apache HttpClient provides a robust, well-tested alternative for projects requiring advanced customization or non-Spring environments (already used in some API modules).
  • Performance: All modern alternatives are more efficient than RestTemplate.

Scope:

  • Evaluation: Assess the current usage of RestTemplate in the codebase and determine the best replacement for each use case .
  • Migration: Replace RestTemplate with the chosen client(s) across all relevant modules.
  • Testing: Update and validate related tests.
  • Documentation: Document the new approach and provide guidelines for future HTTP client usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design changeChange or removal of existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions