Skip to content

Spring Cloud Netflix example of re-using/creating feign clients

License

Notifications You must be signed in to change notification settings

thorstenfrank/multi-feign-clients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multi-feign-clients

Spring Cloud Netflix example of re-using/creating feign clients

Illustrates the problem that even though a @FeignClient annotated client is already available (through an application using the consumer-lib, the @ConditionalOnMissingBean of the lib's autoconfiguration never holds.

This repo is a sample created for issue spring-cloud/spring-cloud-netflix#1852

Contents

  • service-provider is a Spring Boot app with a simple hello world REST interface
  • consumer-lib: library with a dependency to the provider and a RestController automatically created via AutoConfiguration. This controller simply delegates to the service-provider
  • service-consumer: App that uses both the lib and the provider directly.
  • unaware-consumer: no direct dependencies to the provider, only indirectly through the library, including the REST controller from there

Running

You will need to have Eureka running - I'm using port 8761. Adapt the application.yml of each app accordingly if you're using a different one.

About

Spring Cloud Netflix example of re-using/creating feign clients

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages