Partner – Moderne – NPI EA (cat=Spring Boot)
announcement - icon

Refactor Java code safely — and automatically — with OpenRewrite.

Refactoring big codebases by hand is slow, risky, and easy to put off. That’s where OpenRewrite comes in. The open-source framework for large-scale, automated code transformations helps teams modernize safely and consistently.

Each month, the creators and maintainers of OpenRewrite at Moderne run live, hands-on training sessions — one for newcomers and one for experienced users. You’ll see how recipes work, how to apply them across projects, and how to modernize code with confidence.

Join the next session, bring your questions, and learn how to automate the kind of work that usually eats your sprint time.

Course – Black Friday 2026 – NPI EA – main – before_post_content
announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 1st December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

Course – Black Friday 2026 – NPI – main – before_post_content
announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 1st December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

1. Overview

In this tutorial, we’re going to describe the differences between Spring Cloud Netflix Feign and Spring Cloud OpenFeign.

2. Feign

Feign makes writing web service clients easier by providing annotation support that allows us to implement our clients with just interfaces.

Originally, Feign was created and released by Netflix as part of their Netflix OSS project. Today, it is an open-source project.

2.1. Spring Cloud Netflix Feign

Spring Cloud Netflix integrates the Netflix OSS offerings into the Spring Cloud ecosystem. This includes Feign, Eureka, Ribbon, and a host of other tools and utilities. However, Feign was given its own Spring Cloud Starter to allow access to just Feign.

2.2. OpenFeign

Ultimately, Netflix decided to stop using Feign internally and ceased its development. As a result of this decision, Netflix fully transferred Feign to the open-source community under a new project named OpenFeign.

Luckily, it continues to receive immense support from the open-source community and has seen many new features and updates.

2.3. Spring Cloud OpenFeign

Similar to its predecessor, Spring Cloud OpenFeign integrates the predecessor project into the Spring Cloud ecosystem.

Conveniently, this integration adds support for Spring MVC annotations and provides the same HttpMessageConverters.

Let’s compare the Feign implementation found in the Spring Cloud OpenFeign to one using Spring Cloud Netflix Feign.

3. Dependencies

First, we must add the spring-cloud-starter-feign and spring-cloud-dependencies dependencies to our pom.xml file:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-feign</artifactId>
    <versionId>1.4.7.RELEASE</versionID>
</dependency>
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>Hoxton.SR8</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

Please note that this library only works with Spring Boot 1.4.7 or earlier. Therefore our pom.xml must use compatible versions of any Spring Cloud dependencies.

4. Implementation with Spring Cloud Netflix Feign

Now, we can use @EnableFeignClients to enable component scanning for any interfaces that use @FeignClient.

For every example that we developed using the Spring Cloud Netflix Feign project, we use the following imports:

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

The implementation of all features is exactly the same for the old and the new version.

5. Implementation with Spring Cloud OpenFeign

Comparatively, our Spring Cloud OpenFeign tutorial contains the same example as the implementation with Spring Netflix Feign.

The only difference here is that our imports are from a different package:

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

Everything else is the same, which should come as no surprise due to the relation between these two libraries.

6. Comparison

Fundamentally, these two implementations of Feign are identical. We can ascribe this to Netflix Feign being the ancestor of OpenFeign.

However, Spring Cloud OpenFeign includes new options and features that are not available in Spring Cloud Netflix Feign.

Recently, we can get support for Micrometer, Dropwizard Metrics, Apache HTTP Client 5, Google HTTP client, and many more.

7. Conclusion

This article compared the Spring Cloud integrations of OpenFeign and Netflix Feign.

The code backing this article is available on GitHub. Once you're logged in as a Baeldung Pro Member, start learning and coding on the project.
Partner – Moderne – NPI EA (tag=Refactoring)
announcement - icon

Modern Java teams move fast — but codebases don’t always keep up. Frameworks change, dependencies drift, and tech debt builds until it starts to drag on delivery. OpenRewrite was built to fix that: an open-source refactoring engine that automates repetitive code changes while keeping developer intent intact.

The monthly training series, led by the creators and maintainers of OpenRewrite at Moderne, walks through real-world migrations and modernization patterns. Whether you’re new to recipes or ready to write your own, you’ll learn practical ways to refactor safely and at scale.

If you’ve ever wished refactoring felt as natural — and as fast — as writing code, this is a good place to start.

Course – Black Friday 2026 – NPI EA – main – after_post_content

announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 1st December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

Course – Black Friday 2026 – NPI – main – after_post_content

announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 1st December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW