spring-cloud-openfeign icon indicating copy to clipboard operation
spring-cloud-openfeign copied to clipboard

Allow load balancer uri in uri attribute

Open antechrestos opened this issue 3 years ago • 4 comments

Description

Fixes #489 : This change is the one requested by late issue . The aim is to handle url such as lb://some-service (or `lbs://some-service). When such url is specified, we ensure load balance client is provided and we keep it instead of using delegate one).

Code implementation

I willingly kept 3 commit to better describe the implementation

  • improve code specification of name, url and path handle by adding tests
  • refactoring of code, particularly by forcing reentrance of code (url was modified by side effect)
  • implementing the feature

antechrestos avatar Mar 30 '21 17:03 antechrestos

Codecov Report

Merging #518 (5661a35) into master (bcea218) will increase coverage by 0.55%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #518      +/-   ##
============================================
+ Coverage     77.85%   78.41%   +0.55%     
- Complexity      489      499      +10     
============================================
  Files            60       60              
  Lines          1820     1816       -4     
  Branches        267      266       -1     
============================================
+ Hits           1417     1424       +7     
+ Misses          256      249       -7     
+ Partials        147      143       -4     
Impacted Files Coverage Δ Complexity Δ
...mework/cloud/openfeign/FeignClientFactoryBean.java 76.49% <100.00%> (+4.55%) 74.00 <12.00> (+10.00)

codecov[bot] avatar Mar 30 '21 17:03 codecov[bot]

Are you sure it's related to 499? Doesn't seem like it is to me...

Sam-Kruglov avatar Mar 30 '21 18:03 Sam-Kruglov

@Sam-Kruglov Yeah sorry. Thank you for the warning. :pray:

antechrestos avatar Mar 30 '21 18:03 antechrestos

See https://github.com/spring-cloud/spring-cloud-openfeign/issues/489#issuecomment-817707750

OlgaMaciaszek avatar Apr 12 '21 10:04 OlgaMaciaszek