Developing Java Applications with Spring and Spring Boot
by Claudio Eduardo de Oliveira, Greg L. Turnquist, Alex Antonov
How it works...
Similar to what we saw in the previous recipe, the use of the @EnableFeignClients annotation on the main application class, BookPubApplication, explicitly tells Spring Cloud that it should scan for all the interfaces annotated with @FeignClient and create service client implementations based on their definitions. The @EnableFeignClients annotation is similar in nature to the @ComponentScan one, providing attributes to control which packages to scan for the @FeignClient annotated classes or explicitly list the API classes that should be used.
Out of the box, all Feign client implementations are configured using components defined in the FeignClientsConfiguration class, but one can provide alternative configuration classes using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access