liveBook · Manning

@EnableFeignClients annotation

As explained in Spring Start Here, Second Edition

The @EnableFeignClients annotation enables OpenFeign client support and configures scanning for client interfaces.

@EnableFeignClients turns on OpenFeign support and tells it where to find client interfaces. OpenFeign implements interfaces annotated with @FeignClient and makes them injectable as Spring beans. section 11.3

Listing 11.5 Enabling the OpenFeign clients in the configuration class
@Configuration
@EnableFeignClients(    #A
   basePackages = "com.example.proxy")
public class ProjectConfig {
}

A configuration class enables Feign clients and sets the package to scan. section 11.3

How Spring Start Here, Second Edition covers it

How deep it goes
Explains the annotation’s configuration role and how discovered interfaces become injectable beans.
Examples
Shows a configuration class scanning the com.example.proxy package.
What you can do after
Apply @EnableFeignClients in a configuration class to enable client scanning.
How it connects
Connects Spring configuration, @FeignClient interfaces, and Spring bean injection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.