spring-cloud-openfeign
spring-cloud-openfeign copied to clipboard
Allow load balancer uri in uri attribute
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
andpath
handle by adding tests - refactoring of code, particularly by forcing reentrance of code (
url
was modified by side effect) - implementing the feature
Codecov Report
Merging #518 (5661a35) into master (bcea218) will increase coverage by
0.55%
. The diff coverage is100.00%
.
@@ 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) |
Are you sure it's related to 499? Doesn't seem like it is to me...
@Sam-Kruglov Yeah sorry. Thank you for the warning. :pray:
See https://github.com/spring-cloud/spring-cloud-openfeign/issues/489#issuecomment-817707750